Function at 0x438040
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x689058
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x732694]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
cmp byte [esi + 0x79d], 0
jne 0x4381b7
call fcn.00423fb0
mov ecx, eax
call fcn.0041aa90
test eax, eax
jne 0x4381b7
lea ecx, [ebp - 0x11]
call fcn.0041d3e0
push str.Win_
lea eax, [ebp - 0x44]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x11]
call fcn.004eef03
cmp byte [0x732148], 0
mov byte [ebp - 4], 1
je 0x4381a0
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
cmovae eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4381a0
push eax
push eax
push str.dlg_save_main_icon.xml
push dword [esi + 4]
call fcn.00435830
add esp, 0x10
cmp eax, 1
jne 0x4381a0
lea eax, [ebp - 0x2c]
push eax
call fcn.00423fb0
mov ecx, eax
call fcn.004e84c3
cmp dword [ebp - 0x1c], 0
mov byte [ebp - 4], 2
ja 0x438136
lea eax, [ebp - 0x5c]
push 0
push eax
call fcn.004e63e6
add esp, 8
lea ecx, [ebp - 0x2c]
push eax
call fcn.0041cdd0
lea ecx, [ebp - 0x5c]
call fcn.00401e90
lea eax, [ebp - 0x2c]
push eax
call fcn.004e7387
add esp, 4
test eax, eax
jne 0x438153
push 0x693250
lea ecx, [ebp - 0x2c]
call fcn.00402d70
push str.WinGameBox.exe
lea ecx, [ebp - 0x2c]
call fcn.00402d70
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x2c]
push 0
cmovae ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x44]
cmp dword [ebp - 0x30], 8
push 0
cmovae eax, dword [ebp - 0x44]
push 0
push 1
push 0
push 0
push ecx
push eax
lea ecx, [ebp - 0x11]
call fcn.004eec49
call fcn.00423fb0
mov ecx, eax
call fcn.0041b7c0
lea ecx, [ebp - 0x2c]
call fcn.00401e90
lea ecx, [ebp - 0x44]
call fcn.00401e90
lea ecx, [ebp - 0x11]
mov dword [ebp - 4], 0xffffffff
call fcn.004022c0
mov ecx, dword [esi + 0x7cc]
test ecx, ecx
je 0x4381c7
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
lea ecx, [esi + 0x7d4]
mov byte [esi + 0x79c], 0
call fcn.004974b0
lea eax, [esi + 0x30]
neg esi
sbb esi, esi
and esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
mov ecx, 0x7403e4
call fcn.00436a70
mov edx, dword [eax + 8]
xor ecx, ecx
lea edi, [eax + 4]
test edx, edx
jle 0x438297
mov ebx, dword [edi]
mov eax, ebx
cmp dword [eax], esi
je 0x438218
inc ecx
add eax, 4
cmp ecx, edx
jl 0x438207
jmp 0x438297
cmp ecx, 0xffffffff
je 0x438297
test ecx, ecx
js 0x438297
cmp ecx, edx
jge 0x438297
lea eax, [edx - 1]
cmp ecx, eax
je 0x438291
sub edx, ecx
lea ecx, [ebx + ecx*4]
shl edx, 2
lea esi, [ecx + 4]
lea eax, [edx - 4]
test eax, eax
je 0x438283
test ecx, ecx
jne 0x438259
call fcn.00527c8d
mov dword [eax], 0x16
call fcn.0051ae11
mov eax, 0x16
jmp 0x438285
test esi, esi
je 0x438242
cmp edx, eax
jae 0x438278
call fcn.00527c8d
mov dword [eax], 0x22
call fcn.0051ae11
mov eax, 0x22
jmp 0x438285
push eax
push esi
push ecx
call fcn.00517050
add esp, 0xc
xor eax, eax
push eax
call fcn.004328b0
mov edx, dword [edi + 4]
add esp, 4
lea eax, [edx - 1]
mov dword [edi + 4], eax
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00447de7
mov esp, ebp
pop ebp
ret 0x10