Function at 0x4046d0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x478261
mov eax, dword fs:[0]
push eax
sub esp, 0x82c
mov eax, dword [0x494db8]
xor eax, esp
mov dword [esp + 0x824], eax
push ebx
push edi
mov eax, dword [0x494db8]
xor eax, esp
push eax
lea eax, [esp + 0x838]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x10], edi
test edi, edi
je 0x4047ed
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push edi
call ebx
test eax, eax
je 0x4047ed
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404733
sub eax, edx
sar eax, 1
cmp eax, 0x200
jae 0x4047ed
push 0x800
lea eax, [esp + 0x30]
push 0
push eax
call fcn.0045bc00
add esp, 0xc
push 0x400
lea ecx, [esp + 0x30]
push edi
push ecx
call fcn.0045cd4c
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0x14]
push eax
mov edi, 0x484ee0
call fcn.00402490
lea ecx, [esp + 0x10]
mov dword [esp + 0x840], 0
mov edi, dword [esp + 0x10]
push ecx
call fcn.00402490
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push ecx
mov byte [esp + 0x84c], 1
call fcn.0040a820
lea edi, [esp + 0x10]
call fcn.00402530
lea edi, [esp + 0x14]
mov byte [esp + 0x840], 4
call fcn.00402530
cmp dword [esp + 0x1c], 0
jne 0x4047f4
lea ecx, [esp + 0x18]
call fcn.0040a4e0
xor eax, eax
jmp 0x404950
mov ecx, dword [esi + 0x170]
lea edx, [esp + 0x2c]
push edx
push esi
lea edx, [esp + 0x20]
call fcn.00404980
mov eax, dword [esi + 0x13c]
push eax
call ebx
test eax, eax
jne 0x404823
mov eax, dword [esi + 0x174]
push eax
call ebx
test eax, eax
je 0x4047e4
mov eax, dword [esi + 0x148]
push eax
call ebx
test eax, eax
jne 0x40483d
mov eax, dword [esi + 0x180]
push eax
call ebx
test eax, eax
je 0x4047e4
mov eax, dword [esi + 0x140]
push eax
call ebx
test eax, eax
jne 0x404857
mov eax, dword [esi + 0x178]
push eax
call ebx
test eax, eax
je 0x4047e4
mov eax, dword [esi + 0x144]
push eax
call ebx
test eax, eax
jne 0x404875
mov eax, dword [esi + 0x17c]
push eax
call ebx
test eax, eax
je 0x4047e4
mov eax, dword [esi + 0x13c]
mov ecx, dword [esi + 8]
mov edx, dword [ecx + 4]
lea edi, [esi + 8]
push eax
push edi
call edx
test eax, eax
jne 0x40489b
mov ecx, dword [esi + 0x174]
mov eax, dword [edi]
mov edx, dword [eax + 4]
push ecx
push edi
call edx
mov eax, dword [esi + 0x148]
mov ecx, dword [esi + 0x2c]
mov edx, dword [ecx]
lea edi, [esi + 0x2c]
push eax
push edi
call edx
test eax, eax
jne 0x4048bf
mov ecx, dword [esi + 0x180]
mov eax, dword [edi]
mov edx, dword [eax]
push ecx
push edi
call edx
mov eax, dword [esi + 0x140]
test eax, eax
je 0x4048e9
mov ecx, dword [esi + 0x7c]
mov edx, dword [ecx + 4]
lea edi, [esi + 0x7c]
push eax
push edi
call edx
test eax, eax
jne 0x4048e9
mov ecx, dword [esi + 0x178]
mov eax, dword [edi]
mov edx, dword [eax + 4]
push ecx
push edi
call edx
mov ecx, dword [esi + 0x144]
push esi
call fcn.00406d50
test eax, eax
jne 0x404905
mov ecx, dword [esi + 0x17c]
push esi
call fcn.00406d50
lea eax, [esp + 0x18]
push eax
push esi
call fcn.004057a0
lea ecx, [esp + 0x18]
push ecx
push esi
call fcn.00405a50
mov ecx, esi
call fcn.00406100
push esi
lea ecx, [esp + 0x1c]
call fcn.00405c40
push esi
lea ecx, [esp + 0x1c]
call fcn.00406560
lea edx, [esp + 0x18]
push edx
mov ecx, esi
call fcn.00406a60
lea ecx, [esp + 0x18]
call fcn.0040a4e0
mov eax, 1
mov ecx, dword [esp + 0x838]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [esp + 0x824]
xor ecx, esp
call fcn.0045bbec
mov esp, ebp
pop ebp
ret