Function at 0x409401
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x429fa3
call fcn.00428700
sub esp, 0x94
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x5c]
mov byte [eax], 1
call fcn.00403f78
lea ecx, [ebp - 0x34]
call fcn.00402658
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x5c]
mov eax, dword [edi]
mov dword [ebp - 4], ebx
push eax
call fcn.0040422f
test al, al
je 0x409659
mov eax, dword [esi + 0x48]
cmp eax, 2
je 0x409647
cmp eax, ebx
jne 0x40952e
mov ecx, edi
call fcn.00402b82
inc eax
mov ecx, edi
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.004096fb
lea ecx, [ebp - 0x34]
mov edx, eax
push ecx
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.00402634
push dword [ebp - 0x68]
mov byte [ebp - 4], 3
call fcn.00402132
pop ecx
lea edx, [ebp + 8]
push edx
mov dl, byte [esi + 0x3d]
neg dl
lea ebx, [esi + 0xd8]
mov eax, dword [ebp - 0x44]
sbb edx, edx
mov dword [ebp - 0x14], eax
and edx, ebx
lea ebx, [esi + 0xc0]
push edx
mov dl, byte [esi + 0xcb]
neg dl
sbb edx, edx
mov eax, dword [ebp - 0x40]
and edx, ebx
mov dword [ebp - 0x10], eax
push edx
mov eax, dword [esi + 0x50]
push dword [esi + 0x74]
lea edx, [ebp - 0x5c]
mov ecx, dword [eax]
push edx
lea edx, [ebp - 0x14]
push edx
push dword [ebp - 0x24]
push eax
call dword [ecx + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x4094cf
mov esi, eax
jmp 0x4094ea
mov eax, dword [ebp + 8]
sub eax, ebx
je 0x409522
dec eax
je 0x40951b
dec eax
je 0x409517
dec eax
je 0x409510
dec eax
je 0x409507
dec eax
je 0x409500
mov esi, 0x80004005
push dword [ebp - 0x24]
call fcn.00402132
push dword [ebp - 0x34]
call fcn.00402132
pop ecx
jmp 0x409651
mov esi, 0x80004004
jmp 0x4094ea
mov dword [esi + 0x48], 3
jmp 0x409522
mov dword [esi + 0x48], 2
xor esi, esi
jmp 0x4094ea
mov dword [esi + 0x48], 1
push dword [ebp - 0x24]
mov byte [ebp - 4], bl
call fcn.00402132
pop ecx
mov eax, dword [esi + 0x48]
cmp eax, 3
jne 0x409570
mov ecx, edi
call fcn.004069cf
test al, al
jne 0x409564
push edi
mov ecx, esi
push dword [0x42cc14]
call fcn.00408ebc
cmp eax, ebx
je 0x40955a
mov esi, eax
jmp 0x409649
mov esi, 0x80004005
jmp 0x409649
mov byte [esi + 0x174], 1
jmp 0x4096da
cmp eax, 4
jne 0x4095e4
push edi
lea ecx, [ebp - 0x18]
call fcn.0040272b
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.004069cf
test al, al
jne 0x40959e
push edi
mov ecx, esi
push dword [0x42cc14]
call fcn.00408ebc
jmp 0x4095c4
mov ecx, dword [edi]
mov edx, dword [ebp - 0x18]
call fcn.00403bed
test al, al
jne 0x4095d7
call fcn.004049d4
lea ecx, [ebp - 0x18]
push edi
push ecx
mov ecx, esi
push dword [0x42cc18]
push eax
call fcn.00408fe2
cmp eax, ebx
mov esi, eax
jne 0x4095cf
mov esi, 0x80004005
push dword [ebp - 0x18]
jmp 0x4094ed
push dword [ebp - 0x18]
call fcn.00402132
jmp 0x4096d9
mov eax, dword [ebp - 0x3c]
mov ecx, dword [edi]
shr eax, 4
test al, 1
je 0x409606
call fcn.00403be0
test al, al
jne 0x4096da
push edi
push dword [0x42cc20]
jmp 0x409638
call fcn.004046ff
test al, al
je 0x4096da
mov ecx, dword [edi]
call fcn.00403dcc
test al, al
jne 0x4096da
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4096da
push edi
push dword [0x42cc1c]
mov ecx, esi
call fcn.00408fc6
cmp eax, ebx
jne 0x409553
xor esi, esi
push dword [ebp - 0x34]
call fcn.00402132
pop ecx
mov eax, esi
jmp 0x4096ea
mov ecx, dword [edi]
call fcn.0040513b
mov esi, eax
cmp esi, ebx
jl 0x4096da
mov eax, dword [edi]
cmp word [eax + esi*2 + 2], bx
je 0x4096da
push edi
lea ecx, [ebp - 0x18]
call fcn.0040272b
cmp esi, dword [ebp - 0x14]
mov byte [ebp - 4], 5
jae 0x40968b
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], esi
mov word [eax + esi*2], bx
lea ecx, [ebp - 0xa0]
call fcn.00403f78
lea ecx, [ebp - 0x78]
call fcn.00402658
push ebx
lea ecx, [ebp - 0xa0]
push dword [ebp - 0x18]
mov byte [ebp - 4], 6
call fcn.0040422f
test al, al
je 0x4096c8
mov edx, dword [ebp - 0x80]
test dl, 1
je 0x4096c8
mov ecx, dword [ebp - 0x18]
and edx, 0xfffffffe
call fcn.00403bbf
push dword [ebp - 0x78]
call fcn.00402132
push dword [ebp - 0x18]
call fcn.00402132
pop ecx
pop ecx
mov eax, dword [ebp + 0xc]
push dword [ebp - 0x34]
mov byte [eax], bl
call fcn.00402132
pop ecx
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8