; ; AchievementManager::percentForAchievement from 0x140039a90 to 0x140039b47 (183 bytes) ; ; 12 xrefs: ; > AchievementManager::isAchievementEarned @ 0x140039a74 ; > sub_140078010 @ 0x140078149 ; > AchievementCell::loadFromDict @ 0x1400ac979 ; > AchievementCell::loadFromDict @ 0x1400adc43 ; > GameManager::resetAchievement @ 0x14017d3f1 ; > GameManager::reportAchievementWithID @ 0x14017e01f ; > GameManager::reportAchievementWithID @ 0x14017e088 ; > GameManager::reportAchievementWithID @ 0x14017e09c ; > GameManager::dataLoaded @ 0x140187bb2 ; > GameStatsManager::verifyUserCoins @ 0x1401dfc95 ; > GJPathPage::init @ 0x140286677 ; > @ 0x1406c3c60 ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; push rbx ; +0x0, 0x140039a90 sub rsp, 50h ; +0x2, 0x140039a92 mov rax, cs:__security_cookie ; +0x6, 0x140039a96 xor rax, rsp ; +0xd, 0x140039a9d mov [rsp+58h+var_18], rax ; +0x10, 0x140039aa0 mov rbx, rcx ; +0x15, 0x140039aa5 xorps xmm0, xmm0 ; +0x18, 0x140039aa8 movups xmmword ptr [rsp+58h+Block], xmm0 ; +0x1b, 0x140039aab xorps xmm1, xmm1 ; +0x20, 0x140039ab0 movdqu [rsp+58h+var_28], xmm1 ; +0x23, 0x140039ab3 mov r8, 0FFFFFFFFFFFFFFFFh ; +0x29, 0x140039ab9 inc r8 ; +0x30, 0x140039ac0 cmp byte ptr [rdx+r8], 0 ; +0x33, 0x140039ac3 jnz short loc_140039AC0 ; +0x38, 0x140039ac8 lea rcx, [rsp+58h+Block] ; +0x3a, 0x140039aca call sub_14003A930 ; +0x3f, 0x140039acf nop ; +0x44, 0x140039ad4 lea rdx, [rsp+58h+Block] ; +0x45, 0x140039ad5 mov rcx, [rbx+160h] ; +0x4a, 0x140039ada call cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0x51, 0x140039ae1 mov rcx, rax ; +0x57, 0x140039ae7 call cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0x5a, 0x140039aea mov ebx, eax ; +0x60, 0x140039af0 mov rdx, qword ptr [rsp+58h+var_28+8] ; +0x62, 0x140039af2 cmp rdx, 0Fh ; +0x67, 0x140039af7 jbe short loc_140039B32 ; +0x6b, 0x140039afb inc rdx ; +0x6d, 0x140039afd mov rcx, [rsp+58h+Block]; Block ; +0x70, 0x140039b00 mov rax, rcx ; +0x75, 0x140039b05 cmp rdx, 1000h ; +0x78, 0x140039b08 jb short loc_140039B2D ; +0x7f, 0x140039b0f add rdx, 27h ; ''' ; +0x81, 0x140039b11 mov rcx, [rcx-8] ; +0x85, 0x140039b15 sub rax, rcx ; +0x89, 0x140039b19 add rax, 0FFFFFFFFFFFFFFF8h ; +0x8c, 0x140039b1c cmp rax, 1Fh ; +0x90, 0x140039b20 jbe short loc_140039B2D ; +0x94, 0x140039b24 call cs:_invalid_parameter_noinfo_noreturn ; +0x96, 0x140039b26 db 0CCh ; +0x9c, 0x140039b2c call j_j_free ; +0x9d, 0x140039b2d mov eax, ebx ; +0xa2, 0x140039b32 mov rcx, [rsp+58h+var_18] ; +0xa4, 0x140039b34 xor rcx, rsp; StackCookie ; +0xa9, 0x140039b39 call __security_check_cookie ; +0xac, 0x140039b3c add rsp, 50h ; +0xb1, 0x140039b41 pop rbx ; +0xb5, 0x140039b45 retn ; +0xb6, 0x140039b46