Function at 0x40e010
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x718
mov eax, dword [0x4fa2a0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov edx, dword [0x4fb44c]
push ebx
push esi
mov dword [ebp - 0x6f8], eax
mov eax, dword [edx + 0xc]
push edi
mov ecx, 0x4fb44c
call eax
mov edx, dword [0x4fb44c]
add eax, 0x10
mov dword [ebp - 0x6d8], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4fb44c
call eax
mov edx, dword [0x4fb44c]
add eax, 0x10
mov dword [ebp - 0x6e0], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4fb44c
call eax
mov edx, dword [0x4fb44c]
add eax, 0x10
mov dword [ebp - 0x6e4], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4fb44c
call eax
mov edx, dword [0x4fb44c]
lea edi, [eax + 0x10]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fb44c
mov dword [ebp - 0x6f0], edi
call eax
add eax, 0x10
mov dword [ebp - 0x6dc], eax
call fcn.00406aa0
mov ebx, eax
mov eax, str._gameid
lea esi, [ebp - 0x6d0]
call fcn.00403290
lea ecx, [ebp - 0x6dc]
push ecx
mov eax, esi
call fcn.004046c0
mov eax, dword [ebp - 0x6d0]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e0f3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x6dc]
cmp dword [esi - 0xc], 0
jne 0x40e140
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e11b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 0xfffffff0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e86d
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
jmp 0x40e86d
push esi
push 0x4d5a28
lea edi, [ebp - 0x6f0]
call fcn.00403dd0
mov edi, dword [ebp - 0x6f0]
lea ecx, [ebp - 0x6d0]
push edi
push ecx
call fcn.00414a30
mov ebx, dword [ebp - 0x6d0]
add esp, 0x10
cmp dword [ebx - 0xc], 0
jne 0x40e1b3
lea eax, [ebx - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e18f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e1ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
jmp 0x40e854
push 0
lea ecx, [ebp - 0x714]
call fcn.0041cba0
lea ecx, [ebp - 0x6cc]
call fcn.004236a0
add ebx, 0xfffffff0
push ecx
mov eax, ebx
mov esi, esp
mov dword [ebp - 0x6f4], ebx
call fcn.00403ca0
add eax, 0x10
mov dword [esi], eax
call fcn.004145f0
add esp, 4
mov esi, eax
mov dword [ebp - 0x62c], 0xf
mov dword [ebp - 0x630], 0
mov byte [ebp - 0x640], 0
lea edi, [eax + 1]
jmp 0x40e210
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e210
sub eax, edi
push eax
push esi
lea ecx, [ebp - 0x640]
call fcn.00402b70
push 1
lea ecx, [ebp - 0x714]
push ecx
lea edx, [ebp - 0x640]
push edx
lea ecx, [ebp - 0x6cc]
call fcn.00423760
cmp dword [ebp - 0x62c], 0x10
mov byte [ebp - 0x6d1], al
jb 0x40e25f
mov eax, dword [ebp - 0x640]
push eax
call fcn.0042d960
add esp, 4
cmp byte [ebp - 0x6d1], 0
je 0x40e392
push str.code
lea ecx, [ebp - 0x714]
call fcn.0041e110
mov ecx, eax
call fcn.0041d6e0
cmp eax, 0xc8
je 0x40e2c2
lea edi, [ebp - 0x6cc]
call fcn.0040e8f0
lea ecx, [ebp - 0x714]
call fcn.0041d0b0
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e829
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
jmp 0x40e829
lea ecx, [ebp - 0x640]
push ecx
push str.game_name_cn
push str.data
lea ecx, [ebp - 0x714]
call fcn.0041e110
mov ecx, eax
call fcn.0041e110
mov ecx, eax
call fcn.0041d440
sub esp, 0x1c
mov ecx, esp
push 0xffffffffffffffff
push 0
lea edx, [ebp - 0x640]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push edx
mov byte [ecx], 0
call fcn.004027c0
call fcn.004144b0
add esp, 0x1c
mov edx, eax
lea edi, [ebp - 0x6d8]
call fcn.00403380
push str.icon
push str.data
lea ecx, [ebp - 0x714]
call fcn.0041e110
mov ecx, eax
call fcn.0041e110
mov ecx, eax
call fcn.0041d320
mov ebx, eax
lea eax, [ebp - 0x6e0]
call fcn.004033c0
push str.game_name
push str.data
lea ecx, [ebp - 0x714]
call fcn.0041e110
mov ecx, eax
call fcn.0041e110
mov ecx, eax
call fcn.0041d320
mov ebx, eax
lea eax, [ebp - 0x6e4]
call fcn.004033c0
lea ecx, [ebp - 0x640]
call fcn.00402540
push esi
call fcn.0042d960
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x41a]
push ecx
mov word [ebp - 0x41c], ax
call fcn.00436fe0
mov eax, dword [0x4ff104]
add esp, 0x10
test eax, eax
jne 0x40e3e0
push 0x24d8
call fcn.0042d9bc
add esp, 4
test eax, eax
je 0x40e3d9
mov esi, eax
call fcn.00411420
jmp 0x40e3db
xor eax, eax
mov dword [0x4ff104], eax
add eax, 0x410
lea edx, [ebp - 0x41c]
sub edx, eax
lea ecx, [ecx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40e3f0
lea edi, [ebp - 0x41c]
add edi, 0xfffffffe
jmp 0x40e410
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40e410
mov edx, dword [0x4d4c6c]
mov eax, dword [ebp - 0x6dc]
mov dword [edi], edx
mov edx, eax
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40e430
lea edi, [ebp - 0x41c]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x40e446
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x41c]
rep movsb byte es:[edi], byte [esi]
add eax, 0xfffffffe
jmp 0x40e470
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40e470
mov ecx, dword [str..ico]
mov edx, dword [0x4d5aa0]
mov dword [eax], ecx
mov cx, word [0x4d5aa4]
mov dword [eax + 4], edx
mov word [eax + 8], cx
mov eax, dword [0x4ff10c]
test eax, eax
jne 0x40e4be
push 4
call fcn.0042d9bc
add esp, 4
test eax, eax
je 0x40e4b7
mov dword [eax], vtable.CStatistic.0
jmp 0x40e4b9
xor eax, eax
mov dword [0x4ff10c], eax
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push 0
push 0
lea ecx, [ebp - 0x41c]
push ecx
mov ecx, dword [ebp - 0x6e0]
push ecx
push eax
call edx
mov eax, dword [0x4fb44c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4fb44c
call edx
lea ebx, [eax + 0x10]
lea eax, [ebp - 0x41c]
lea esi, [ebp - 0x6fc]
mov dword [ebp - 0x6e8], ebx
call fcn.00403290
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x212]
push ecx
mov word [ebp - 0x214], ax
call fcn.00436fe0
mov eax, dword [ebp - 0x6d8]
add esp, 0xc
cmp dword [eax - 0xc], 0
jne 0x40e55e
mov eax, dword [ebp - 0x6e4]
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40e533
lea edi, [ebp - 0x214]
sub eax, edx
add edi, 0xfffffffe
lea esp, [esp]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x40e550
jmp 0x40e582
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40e560
lea edi, [ebp - 0x214]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x40e576
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [0x4ff104]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test eax, eax
jne 0x40e5bc
push 0x24d8
call fcn.0042d9bc
add esp, 4
test eax, eax
je 0x40e5b5
mov esi, eax
call fcn.00411420
jmp 0x40e5b7
xor eax, eax
mov dword [0x4ff104], eax
cmp byte [eax + 0x24d0], 0
lea eax, [ebp - 0x214]
je 0x40e5ef
add eax, 0xfffffffe
mov edi, edi
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40e5d0
mov edx, dword [0x4d5aa8]
mov ecx, dword [0x4d5aac]
mov dword [eax], edx
mov dword [eax + 4], ecx
jmp 0x40e62c
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40e5f2
mov edx, dword [str._Trainer]
mov ecx, dword [0x4d5ab4]
mov dword [eax], edx
mov edx, dword [0x4d5ab8]
mov dword [eax + 4], ecx
mov ecx, dword [0x4d5abc]
mov dword [eax + 8], edx
mov dx, word [0x4d5ac0]
mov dword [eax + 0xc], ecx
mov word [eax + 0x10], dx
lea eax, [ebp - 0x214]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40e635
mov ecx, dword [str..lnk]
mov edx, dword [0x4d5ac8]
mov dword [eax], ecx
mov cx, word [0x4d5acc]
mov dword [eax + 4], edx
mov word [eax + 8], cx
lea ecx, [ebp - 0x214]
call fcn.0040dec0
lea eax, [ebp - 0x214]
lea esi, [ebp - 0x6ec]
call fcn.00403290
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x622]
push eax
mov word [ebp - 0x624], dx
call fcn.00436fe0
add esp, 0xc
lea ecx, [ebp - 0x6d0]
push ecx
push 0
push 0
mov dword [ebp - 0x6d0], 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov esi, dword [ebp - 0x6fc]
test eax, eax
jne 0x40e79a
mov eax, dword [ebp - 0x6d0]
lea edx, [ebp - 0x624]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov ecx, dword [ebp - 0x6d0]
push ecx
mov edi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test edi, edi
je 0x40e79a
cmp dword [ebx - 0xc], 0
jne 0x40e726
mov edx, str._main
lea edi, [ebp - 0x6e8]
call fcn.00403380
mov edx, edi
push edx
mov edx, str.__gameid
call fcn.00403c60
mov eax, dword [ebp - 0x6dc]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ebx, edi
call fcn.00403d10
mov ebx, dword [ebp - 0x6e8]
mov edi, dword [ebp - 0x6ec]
cmp dword [edi - 4], 1
jle 0x40e748
mov edx, dword [edi - 0xc]
push edx
lea eax, [ebp - 0x6ec]
push eax
call fcn.00403650
mov edi, dword [ebp - 0x6ec]
mov ecx, dword [ebp - 0x6f8]
push edi
add ecx, 0xc30
push ecx
mov edx, ebx
push esi
mov ebx, 0x4d4de0
lea ecx, [ebp - 0x624]
call fcn.0040cf70
mov eax, dword [edi - 8]
push eax
push edi
call fcn.0042ded6
add esp, 8
test eax, eax
js 0x40e790
cmp eax, dword [edi - 8]
jg 0x40e790
mov ebx, dword [ebp - 0x6e8]
xor edx, edx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], dx
jmp 0x40e7a0
push 0x80070057
call fcn.00403050
mov edi, dword [ebp - 0x6ec]
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e7bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e7d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e7f4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea edi, [ebp - 0x6cc]
call fcn.0040e8f0
lea ecx, [ebp - 0x714]
call fcn.0041d0b0
mov eax, dword [ebp - 0x6f4]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e829
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x6dc]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e84b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x6f0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e86d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x6e4]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e88f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x6e0]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e8b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x6d8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e8d3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042cf77
mov esp, ebp
pop ebp
ret 4