Function at 0x405890
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x42bc38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [esp + 0x28]
xor ebx, ebx
mov eax, dword [esi + 0x10]
mov ecx, edi
add eax, 0x14
mov dword [esp + 0xc], ebx
push eax
call fcn.0041be5a
push edi
mov ecx, esi
call fcn.00405ae0
test eax, eax
je 0x405ab8
mov ecx, dword [0x47f64c]
push ebp
mov dword [esp + 0x2c], ecx
mov eax, dword [edi]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
mov dword [esp + 0x28], ebx
call ebp
mov edx, dword [esi + 0x10]
mov dword [edx + 0x54], eax
mov ecx, dword [esi + 0x10]
cmp dword [ecx + 0x54], 0xffffffff
jne 0x4059dd
lea eax, [esp + 0x14]
push edi
push eax
mov ecx, esi
call fcn.00408340
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 1
call fcn.0041be5a
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], bl
call fcn.0041bd6d
mov eax, dword [edi]
cmp dword [eax - 8], ebx
je 0x40599e
mov bl, 2
push eax
call ebp
mov ecx, dword [esi + 0x10]
mov dword [ecx + 0x54], eax
mov edx, dword [esi + 0x10]
cmp dword [edx + 0x54], 0xffffffff
jne 0x4059d4
lea eax, [esp + 0x18]
push edi
push eax
mov ecx, esi
call fcn.00408340
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x14]
push ecx
push eax
push edx
mov byte [esp + 0x30], bl
call fcn.0041bf50
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 3
call fcn.0041be5a
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], bl
call fcn.0041bd6d
lea ecx, [esp + 0x18]
mov byte [esp + 0x24], 0
call fcn.0041bd6d
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x405934
push 0x194
mov ecx, esi
call fcn.00406080
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 0xffffffff
call fcn.0041bd6d
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret 4
mov ecx, dword [esi + 0x10]
test byte [ecx + 0x54], 0x10
jne 0x40599e
mov eax, dword [edi]
mov dword [esp + 0x10], 1
mov ebp, dword [eax - 8]
mov dl, byte [eax + ebp - 1]
cmp dl, 0x5c
jne 0x405a24
mov eax, ebp
mov ecx, edi
dec eax
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004154cc
mov ecx, dword [esi + 0x10]
push eax
add ecx, 0x50
mov byte [esp + 0x28], 4
call fcn.0041be5a
lea ecx, [esp + 0x18]
mov byte [esp + 0x24], 0
call fcn.0041bd6d
jmp 0x405a2d
push edi
add ecx, 0x50
call fcn.0041be5a
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx - 8]
test eax, eax
je 0x405a68
mov ecx, dword [esi + 0x10]
lea edx, [esp + 0x2c]
push edx
add ecx, 8
call fcn.0041be5a
lea eax, [esp + 0x2c]
mov ecx, esi
push eax
call fcn.00405ae0
test eax, eax
je 0x405a68
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [esi + 0x10]
add ecx, 4
call fcn.0041be5a
mov eax, dword [esi + 0x10]
test byte [eax + 0x54], 0x10
je 0x405a94
push 0
push 0x73
mov ecx, esi
call fcn.00408420
test eax, eax
jne 0x4059aa
push 1
push 0x75
mov ecx, esi
call fcn.00408420
jmp 0x4059aa
mov ecx, dword [eax + 0x58]
test ecx, ecx
je 0x4059aa
mov ecx, esi
call fcn.00408600
test eax, eax
jne 0x4059aa
push 0x190
jmp 0x4059a3
push 0x190
mov ecx, esi
call fcn.00406080
mov ecx, dword [esp + 0x18]
pop edi
mov eax, ebx
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret 4