Function at 0x438180
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x689338
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 0x4382f7
call fcn.004240e0
mov ecx, eax
call fcn.0041aa90
test eax, eax
jne 0x4382f7
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.004ef16e
cmp byte [0x732148], 0
mov byte [ebp - 4], 1
je 0x4382e0
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 0x4382e0
push eax
push eax
push str.dlg_save_main_icon.xml
push dword [esi + 4]
call fcn.00435960
add esp, 0x10
cmp eax, 1
jne 0x4382e0
lea eax, [ebp - 0x2c]
push eax
call fcn.004240e0
mov ecx, eax
call fcn.004e8673
cmp dword [ebp - 0x1c], 0
mov byte [ebp - 4], 2
ja 0x438276
lea eax, [ebp - 0x5c]
push 0
push eax
call fcn.004e6596
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.004e7537
add esp, 4
test eax, eax
jne 0x438293
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.004eeeb4
call fcn.004240e0
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 0x438307
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
lea ecx, [esi + 0x7d4]
mov byte [esi + 0x79c], 0
call fcn.00497670
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.00436ba0
mov edx, dword [eax + 8]
xor ecx, ecx
lea edi, [eax + 4]
test edx, edx
jle 0x4383d7
mov ebx, dword [edi]
mov eax, ebx
cmp dword [eax], esi
je 0x438358
inc ecx
add eax, 4
cmp ecx, edx
jl 0x438347
jmp 0x4383d7
cmp ecx, 0xffffffff
je 0x4383d7
test ecx, ecx
js 0x4383d7
cmp ecx, edx
jge 0x4383d7
lea eax, [edx - 1]
cmp ecx, eax
je 0x4383d1
sub edx, ecx
lea ecx, [ebx + ecx*4]
shl edx, 2
lea esi, [ecx + 4]
lea eax, [edx - 4]
test eax, eax
je 0x4383c3
test ecx, ecx
jne 0x438399
call fcn.00527efd
mov dword [eax], 0x16
call fcn.0051b074
mov eax, 0x16
jmp 0x4383c5
test esi, esi
je 0x438382
cmp edx, eax
jae 0x4383b8
call fcn.00527efd
mov dword [eax], 0x22
call fcn.0051b074
mov eax, 0x22
jmp 0x4383c5
push eax
push esi
push ecx
call fcn.005172b0
add esp, 0xc
xor eax, eax
push eax
call fcn.004329e0
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.00447f77
mov esp, ebp
pop ebp
ret 0x10