Function at 0x40f690
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x63c
mov eax, dword [0x4fb2a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov esi, ecx
push 0x206
push eax
lea ecx, [ebp - 0x61e]
push ecx
mov dword [ebp - 0x638], esi
mov word [ebp - 0x620], ax
call fcn.00438200
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x416]
push eax
mov word [ebp - 0x418], dx
call fcn.00438200
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
add esp, 0x18
lea ecx, [ebp - 0x624]
push ecx
push 0
push 0
mov dword [ebp - 0x624], 0
call ebx
test eax, eax
jne 0x40f729
mov eax, dword [ebp - 0x624]
lea edx, [ebp - 0x620]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov ecx, dword [ebp - 0x624]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov edx, dword [0x4fc44c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc44c
call eax
lea ecx, [ebp - 0x620]
push ecx
add eax, 0x10
push str._sGameBuff.lnk
lea edi, [ebp - 0x62c]
mov dword [ebp - 0x62c], eax
call fcn.00403db0
add esp, 8
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov eax, dword [ebp - 0x62c]
test eax, eax
je 0x40f77b
lea edx, [ebp - 0x418]
push edx
push eax
call fcn.0040d080
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x624]
push ecx
mov eax, esi
call fcn.0040dca0
mov edx, dword [0x4fc44c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc44c
call eax
add eax, 0x10
mov dword [ebp - 0x630], eax
mov eax, dword [0x50012c]
test eax, eax
jne 0x40f7d3
push 0x24d4
call fcn.0042ec5c
add esp, 4
test eax, eax
je 0x40f7cc
mov esi, eax
call fcn.004112e0
jmp 0x40f7ce
xor eax, eax
mov dword [0x50012c], eax
add eax, 0x410
push eax
push str._s_resdesk.ico
lea edi, [ebp - 0x630]
call fcn.00403db0
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x20e]
push edx
mov word [ebp - 0x210], cx
call fcn.00438200
add esp, 0x14
lea eax, [ebp - 0x628]
push eax
push 0
push 0
mov dword [ebp - 0x628], 0
call ebx
test eax, eax
jne 0x40f9d1
mov edx, dword [ebp - 0x628]
lea ecx, [ebp - 0x210]
push ecx
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov esi, eax
mov eax, dword [ebp - 0x628]
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
je 0x40f9d1
mov esi, dword [ebp - 0x624]
mov eax, dword [esi - 0xc]
test eax, eax
jne 0x40f874
push str._main
lea ecx, [ebp - 0x624]
push ecx
lea ebx, [eax + 5]
call fcn.004034f0
jmp 0x40f8a2
js 0x40f891
push str._main
push esi
call fcn.00430802
add esp, 8
test eax, eax
je 0x40f891
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x40f8a2
lea edx, [ebp - 0x624]
push edx
mov edx, str.__main
call fcn.00403c40
mov eax, dword [0x50012c]
test eax, eax
jne 0x40f8cc
push 0x24d4
call fcn.0042ec5c
add esp, 4
test eax, eax
je 0x40f8c5
mov esi, eax
call fcn.004112e0
jmp 0x40f8c7
xor eax, eax
mov dword [0x50012c], eax
add eax, 0x820
lea esi, [ebp - 0x634]
call fcn.00403290
mov edi, dword [ebp - 0x634]
cmp dword [edi - 0xc], 0
jl 0x40f915
push 0x4d63f8
push edi
call fcn.00430802
add esp, 8
test eax, eax
je 0x40f915
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x40f915
push 0xc
push str.__abroadgame
lea ebx, [ebp - 0x624]
call fcn.00403cf0
mov eax, 0x4d63ac
lea esi, [ebp - 0x628]
call fcn.00403290
mov esi, dword [ebp - 0x628]
cmp dword [esi - 4], 1
jle 0x40f947
mov eax, dword [esi - 0xc]
push eax
lea ecx, [ebp - 0x628]
push ecx
call fcn.00403600
mov esi, dword [ebp - 0x628]
mov edx, dword [ebp - 0x638]
mov eax, dword [ebp - 0x630]
push esi
add edx, 0xc30
push edx
mov edx, dword [ebp - 0x624]
push eax
mov ebx, 0x4d5dd0
lea ecx, [ebp - 0x210]
call fcn.0040cec0
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0042f176
add esp, 8
test eax, eax
js 0x40fa48
cmp eax, dword [esi - 8]
jg 0x40fa48
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f9b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f9d1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f9f3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x624]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa15
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x62c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa37
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042e217
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00403050
int3