Function at 0x404960
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x484151
mov eax, dword fs:[0]
push eax
sub esp, 0x82c
mov eax, dword [0x4a30f8]
xor eax, esp
mov dword [esp + 0x824], eax
push ebx
push edi
mov eax, dword [0x4a30f8]
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 0x404a7d
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push edi
call ebx
test eax, eax
je 0x404a7d
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4049c3
sub eax, edx
sar eax, 1
cmp eax, 0x200
jae 0x404a7d
push 0x800
lea eax, [esp + 0x30]
push 0
push eax
call fcn.00461880
add esp, 0xc
push 0x400
lea ecx, [esp + 0x30]
push edi
push ecx
call fcn.004625ca
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0x14]
push eax
mov edi, str.version1.0_encodingutf_16
call fcn.00402310
lea ecx, [esp + 0x10]
mov dword [esp + 0x840], 0
mov edi, dword [esp + 0x10]
push ecx
call fcn.00402310
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.0040a580
lea edi, [esp + 0x10]
call fcn.004023b0
lea edi, [esp + 0x14]
mov byte [esp + 0x840], 4
call fcn.004023b0
cmp dword [esp + 0x1c], 0
jne 0x404a84
lea ecx, [esp + 0x18]
call fcn.0040a240
xor eax, eax
jmp 0x404bd4
mov ecx, dword [esi + 0x154]
lea edx, [esp + 0x2c]
push edx
push esi
lea edx, [esp + 0x20]
call fcn.00404c10
mov eax, dword [esi + 0x120]
push eax
call ebx
test eax, eax
jne 0x404ab3
mov eax, dword [esi + 0x158]
push eax
call ebx
test eax, eax
je 0x404a74
mov eax, dword [esi + 0x12c]
push eax
call ebx
test eax, eax
jne 0x404acd
mov eax, dword [esi + 0x164]
push eax
call ebx
test eax, eax
je 0x404a74
mov eax, dword [esi + 0x124]
push eax
call ebx
test eax, eax
jne 0x404ae7
mov eax, dword [esi + 0x15c]
push eax
call ebx
test eax, eax
je 0x404a74
mov eax, dword [esi + 0x128]
push eax
call ebx
test eax, eax
jne 0x404b05
mov eax, dword [esi + 0x160]
push eax
call ebx
test eax, eax
je 0x404a74
mov eax, dword [esi + 0x120]
mov ecx, dword [esi + 8]
mov edx, dword [ecx + 4]
lea edi, [esi + 8]
push eax
push edi
call edx
test eax, eax
jne 0x404b2b
mov ecx, dword [esi + 0x158]
mov eax, dword [edi]
mov edx, dword [eax + 4]
push ecx
push edi
call edx
mov eax, dword [esi + 0x12c]
mov ecx, dword [esi + 0x2c]
mov edx, dword [ecx]
lea edi, [esi + 0x2c]
push eax
push edi
call edx
test eax, eax
jne 0x404b4f
mov ecx, dword [esi + 0x164]
mov eax, dword [edi]
mov edx, dword [eax]
push ecx
push edi
call edx
mov eax, dword [esi + 0x124]
test eax, eax
je 0x404b79
mov ecx, dword [esi + 0x7c]
mov edx, dword [ecx + 4]
lea edi, [esi + 0x7c]
push eax
push edi
call edx
test eax, eax
jne 0x404b79
mov ecx, dword [esi + 0x15c]
mov eax, dword [edi]
mov edx, dword [eax + 4]
push ecx
push edi
call edx
mov ecx, dword [esi + 0x128]
push esi
call fcn.00406e30
test eax, eax
jne 0x404b95
mov ecx, dword [esi + 0x160]
push esi
call fcn.00406e30
lea eax, [esp + 0x18]
push eax
push esi
call fcn.00405bc0
lea ecx, [esp + 0x18]
push ecx
push esi
call fcn.00405e70
mov ecx, esi
call fcn.00406520
push esi
lea ecx, [esp + 0x1c]
call fcn.00406060
push esi
lea ecx, [esp + 0x1c]
call fcn.00406910
lea ecx, [esp + 0x18]
call fcn.0040a240
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.00461862
mov esp, ebp
pop ebp
ret