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

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push edi
mov ebx, eax
mov edi, ecx
xor eax, eax
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
call esi
push ebx
mov ebp, eax
call esi
lea esi, [eax + ebp + 2]
push esi
call fcn.0040885b
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4052e2
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 4]
test esi, esi
jne 0x4052c4
mov esi, dword [eax + 8]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
push eax
call fcn.00406b30
add esp, 4
mov eax, 0xe
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push esi
push 0
push ebp
call fcn.00409070
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x405331
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 4]
test eax, eax
jne 0x405316
mov eax, dword [ecx + 8]
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
push ebp
push 0x17
mov edx, eax
call fcn.00406870
mov ebx, dword [esp + 0x1c]
jmp 0x40549a
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40533c
mov byte [eax], 0
cmp esi, 0x7fffffff
jbe 0x40534e
mov eax, 0x80070057
movzx esi, ax
jmp 0x405308
xor edi, edi
test esi, esi
mov ecx, esi
mov eax, ebp
je 0x40536b
cmp byte [eax], 0
je 0x405367
add eax, 1
sub ecx, 1
jne 0x405358
jmp 0x40536b
test ecx, ecx
jne 0x405391
mov edi, 0x80070057
xor edx, edx
test edi, edi
mov eax, edi
jl 0x405385
mov ecx, esi
sub ecx, edx
add edx, ebp
mov eax, ebx
call fcn.004013f0
test eax, eax
jge 0x405397
movzx esi, ax
jmp 0x405308
mov edx, esi
sub edx, ecx
jmp 0x405372
lea edi, [esi + esi]
push edi
call fcn.0040885b
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x14], ebx
jne 0x4053d6
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 4]
test esi, esi
jne 0x4053bb
mov esi, dword [eax + 8]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
push edx
call fcn.00406b30
add esp, 4
mov esi, 0xe
jmp 0x40549d
lea eax, [esp + 0x18]
push eax
push ebx
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov esi, eax
cmp esi, edi
jbe 0x405442
push ebx
call fcn.00407d45
add esp, 4
push esi
call fcn.0040885b
add esp, 4
test eax, eax
mov dword [esp + 0x14], eax
jne 0x40542e
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 4]
test esi, esi
jne 0x405412
mov esi, dword [eax + 8]
mov ecx, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x2c]
call fcn.00406b30
mov ebx, dword [esp + 0x18]
add esp, 4
mov esi, 0xe
jmp 0x40549d
lea edx, [esp + 0x18]
push edx
push eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov ebx, dword [esp + 0x14]
mov esi, eax
test esi, esi
je 0x405300
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40547f
mov eax, dword [esp + 0x24]
mov edx, dword [eax + 4]
test edx, edx
jne 0x405464
mov edx, dword [eax + 8]
mov ecx, dword [esp + 0x20]
push ebx
mov ebx, dword [esp + 0x2c]
push 0x1c
call fcn.00406870
mov ebx, dword [esp + 0x1c]
mov esi, 2
jmp 0x40549a
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
push eax
push ecx
mov ecx, ebx
call fcn.004059b0
mov esi, eax
add esp, 8
push ebp
call fcn.00407d45
add esp, 4
test ebx, ebx
je 0x4054b3
push ebx
call fcn.00407d45
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret