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

Disassembly:
push ebx
mov ebx, eax
mov eax, edx
push esi
add esp, 0xfffffef8
and eax, 7
cmp eax, 2
jne 0x405a5a
mov eax, ebx
jmp 0x40592a
inc dword [0x4188ac]
mov ecx, dword [0x4188ac]
mov dl, byte [eax]
inc eax
test dl, dl
mov byte [ecx], dl
jne 0x405924
mov eax, dword [0x4188a4]
call fcn.004055d9
test eax, eax
je 0x405960
mov eax, ebx
jmp 0x405951
inc dword [0x4188b0]
mov ecx, dword [0x4188b0]
mov dl, byte [eax]
inc eax
test dl, dl
mov byte [ecx], dl
jne 0x40594b
push dword [0x4188a8]
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x4059e9
cmp dword [0x40bfec], 0
jne 0x405999
mov eax, dword [0x4188a4]
call fcn.0040518c
mov eax, dword [0x4188a8]
call fcn.0040518c
mov eax, 2
jmp 0x405d26
mov eax, dword [0x4188a8]
call fcn.0040521c
inc eax
jne 0x4059dd
push dword [0x4188a8]
mov eax, 0x6f
call fcn.00402310
push eax
call fcn.004027c8
add esp, 8
mov eax, dword [0x4188a4]
call fcn.0040518c
mov eax, dword [0x4188a8]
call fcn.0040518c
mov eax, 3
jmp 0x405d26
mov dword [0x418890], 1
jmp 0x405a25
test bl, 0x10
jne 0x405a25
push dword [0x4188a8]
mov eax, 0x6f
call fcn.00402310
push eax
call fcn.004027c8
add esp, 8
mov eax, dword [0x4188a4]
call fcn.0040518c
mov eax, dword [0x4188a8]
call fcn.0040518c
mov eax, 3
jmp 0x405d26
mov edx, dword [0x4188ac]
inc dword [0x4188ac]
mov byte [edx], 0x2f
mov ecx, dword [0x4188b0]
inc dword [0x4188b0]
mov byte [ecx], 0x2f
mov eax, dword [0x4188b0]
xor edx, edx
mov byte [eax], dl
mov eax, dword [0x4188ac]
mov byte [eax], dl
xor eax, eax
jmp 0x405d26
mov eax, edx
and eax, 7
cmp eax, 4
jne 0x405aa6
mov edx, dword [0x4188a8]
mov eax, ebx
call fcn.004053fc
mov eax, dword [0x4188a8]
call fcn.0040518c
mov eax, dword [0x4188a4]
call fcn.0040518c
xor edx, edx
mov dword [0x4188b0], edx
mov dword [0x4188ac], edx
mov dword [0x4188a8], edx
mov dword [0x4188a4], edx
xor eax, eax
jmp 0x405d26
cmp eax, 3
jne 0x405b27
mov eax, ebx
xor esi, esi
jmp 0x405adf
inc dword [0x4188ac]
mov edx, dword [0x4188ac]
sub edx, dword [0x4188a4]
cmp edx, 0x104
jl 0x405adf
dec dword [0x4188ac]
mov esi, 1
mov ecx, dword [0x4188ac]
mov byte [ecx], 0
mov ecx, dword [0x4188ac]
mov dl, byte [eax]
inc eax
test dl, dl
mov byte [ecx], dl
jne 0x405ab1
mov eax, dword [0x40c624]
test byte [eax + 0x14], 0x20
jne 0x405b07
mov eax, dword [0x4188a4]
call fcn.004055d9
test eax, eax
je 0x405b20
mov eax, ebx
jmp 0x405b11
inc dword [0x4188b0]
mov ecx, dword [0x4188b0]
mov dl, byte [eax]
inc eax
test dl, dl
mov byte [ecx], dl
jne 0x405b0b
mov eax, esi
jmp 0x405d26
mov ecx, edx
and ecx, 7
dec ecx
jne 0x405cfa
mov eax, dword [0x418898]
add eax, dword [0x4189c0]
inc eax
call fcn.00405178
mov dword [0x4188a4], eax
test eax, eax
jne 0x405b57
mov eax, 0xa
jmp 0x405d26
mov eax, dword [0x418898]
add eax, dword [0x4189c0]
inc eax
call fcn.00405178
mov dword [0x4188a8], eax
test eax, eax
jne 0x405b85
mov eax, dword [0x4188a4]
call fcn.0040518c
mov eax, 0xa
jmp 0x405d26
mov edx, dword [0x40c624]
test byte [edx + 0x14], 0x20
je 0x405c83
cmp dword [0x418894], 0
je 0x405bbe
xor ecx, ecx
mov cl, byte [ebx + 1]
cmp ecx, 0x3a
jne 0x405bbe
xor eax, eax
mov al, byte [ebx]
call fcn.004051e0
mov edx, dword [0x4188a4]
mov byte [edx], al
jmp 0x405c3e
cmp dword [0x418894], 0
jne 0x405bf9
cmp dword [0x4189c0], 1
jle 0x405bf9
mov ecx, dword [0x4188a0]
xor eax, eax
mov al, byte [ecx + 1]
cmp eax, 0x3a
jne 0x405bf9
mov edx, dword [0x4188a0]
xor eax, eax
mov al, byte [edx]
call fcn.004051e0
mov edx, dword [0x4188a4]
mov byte [edx], al
jmp 0x405c3e
push esp
lea ecx, [esp + 8]
push ecx
push 0x104
push 0x40a3fb
call sub.KERNEL32.DLL_GetFullPathNameA
cmp eax, 0x104
jbe 0x405c1f
mov eax, 1
jmp 0x405d26
xor edx, edx
mov dl, byte [esp + 4]
add edx, 0xffffffa0
mov dword [0x41889c], edx
mov eax, dword [0x4188a4]
mov cl, byte [0x41889c]
add cl, 0x60
mov byte [eax], cl
mov edx, dword [0x4188a4]
xor ecx, ecx
mov cl, byte [edx]
add ecx, 0xffffffa0
mov dword [0x41889c], ecx
mov eax, dword [0x4188a4]
xor edx, edx
mov dl, byte [eax]
cmp edx, 0x61
jge 0x405c78
call fcn.0040518c
mov eax, dword [0x4188a8]
call fcn.0040518c
mov eax, 0x4e
jmp 0x405d26
mov edx, dword [0x4188a4]
mov byte [edx], 0
jmp 0x405cbe
cmp dword [0x418894], 0
je 0x405c9a
mov edx, ebx
mov eax, dword [0x4188a4]
call fcn.004053fc
jmp 0x405cbe
cmp dword [0x4189c0], 0
jle 0x405cb5
mov edx, dword [0x4188a0]
mov eax, dword [0x4188a4]
call fcn.004053fc
jmp 0x405cbe
mov ecx, dword [0x4188a4]
mov byte [ecx], 0
mov eax, dword [0x4188a4]
mov dword [0x4188ac], eax
mov edx, dword [0x4188a8]
mov dword [0x4188b0], edx
jmp 0x405ce2
inc dword [0x4188b0]
inc dword [0x4188ac]
mov ecx, dword [0x4188ac]
mov edx, dword [0x4188b0]
mov al, byte [ecx]
mov byte [edx], al
test al, al
jne 0x405cd6
xor eax, eax
jmp 0x405d26
and edx, 7
cmp edx, 5
jne 0x405d21
cmp dword [0x4189c0], 0
jle 0x405d1d
mov eax, dword [0x4188a0]
call fcn.0040518c
xor edx, edx
mov dword [0x4189c0], edx
xor eax, eax
jmp 0x405d26
mov eax, 0x63
add esp, 0x108
pop esi
pop ebx
ret