Function at 0x404187
Capabilities:
Check if file exists

Disassembly:
push ebp
sub esp, 0x25c
lea ebp, [esp - 4]
mov eax, dword [0x4a20b0]
xor eax, ebp
mov dword [ebp + 0x25c], eax
push 0x3c
mov eax, 0x484ed6
call fcn.00469021
mov eax, dword [ebp + 0x268]
push dword [eax + 4]
mov dword [ebp - 0x10], eax
lea eax, [ebp + 0x38]
push eax
call fcn.00412d19
pop ecx
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
cmp dword [ebp + 0x4c], edi
je 0x404396
xor eax, eax
mov dword [ebp + 0x34], 7
mov dword [ebp + 0x30], edi
mov word [ebp + 0x20], ax
mov byte [ebp - 4], 1
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x4041f0
lea eax, [ebp + 0x3c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x4042e8
xor eax, eax
push 0x206
mov word [ebp + 0x54], ax
lea eax, [ebp + 0x56]
push edi
push eax
call fcn.00469330
mov eax, dword [ebp + 0x3c]
add esp, 0xc
cmp dword [ebp + 0x50], 8
jae 0x404223
lea eax, [ebp + 0x3c]
push 0x104
push eax
lea eax, [ebp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 0x48]
push eax
call fcn.004155a9
push eax
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 2
call fcn.0040124d
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x404258
mov eax, dword [eax + 4]
jmp 0x40425b
add eax, 4
push eax
lea eax, [ebp + 0x54]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
xor ebx, ebx
push edi
inc ebx
push ebx
lea esi, [ebp - 0x2c]
call fcn.0040498a
push edi
push ebx
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], bl
call fcn.0040488d
push str..oml
lea eax, [ebp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp + 0x54]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4042c6
mov eax, dword [ebp - 0x10]
push 0x10
push 0x4892c8
push str.gb0R
push dword [eax + 4]
call dword [sym.imp.USER32.dll_MessageBoxW]
push edi
push ebx
lea esi, [ebp + 0x1c]
call fcn.0040498a
push edi
push ebx
jmp 0x404399
lea eax, [ebp + 0x54]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x4042cc
sub eax, edx
lea ecx, [ebp + 0x54]
sar eax, 1
push ecx
lea esi, [ebp + 0x1c]
call fcn.00404d99
jmp 0x4042f7
push 0xffffffffffffffff
push edi
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp + 0x38]
call fcn.004048d8
push 0xf
pop esi
push edi
lea ecx, [ebp]
mov dword [ebp + 0x18], esi
call fcn.00404bdf
mov byte [ebp - 4], 3
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x404316
lea eax, [ebp + 0x20]
push eax
lea ecx, [ebp]
call fcn.00415b03
mov ebx, eax
pop ecx
cmp ebx, edi
jne 0x404347
mov esi, dword [ebp - 0x10]
push 0x40
push 0x4892ac
push 0x489c84
push dword [esi + 4]
call dword [sym.imp.USER32.dll_MessageBoxW]
push edi
push esi
call fcn.00402064
jmp 0x404380
push edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x14], esi
call fcn.00404bdf
push 0x10
push 0x4892c8
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 4
call fcn.00415c0e
pop ecx
push eax
mov eax, dword [ebp - 0x10]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_MessageBoxW]
push edi
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040488d
push edi
push 1
lea ecx, [ebp]
call fcn.0040488d
push edi
push 1
lea esi, [ebp + 0x1c]
call fcn.0040498a
push edi
push 1
lea esi, [ebp + 0x38]
call fcn.0040498a
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x25c]
xor ecx, ebp
call fcn.004678b3
add ebp, 0x260
leave
ret 4