Function at 0x403e50
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 0x403eb2
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 4]
test esi, esi
jne 0x403e94
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
je 0x403ff1
mov eax, dword [esp + 0x18]
test eax, eax
je 0x403edf
mov byte [eax], 0
cmp esi, 0x7fffffff
jbe 0x403ef4
mov eax, 0x80070057
movzx esi, ax
jmp 0x403ff9
xor edi, edi
test esi, esi
mov ecx, esi
mov eax, ebp
je 0x403f13
mov edi, edi
cmp byte [eax], 0
je 0x403f0f
add eax, 1
sub ecx, 1
jne 0x403f00
jmp 0x403f13
test ecx, ecx
jne 0x403f39
mov edi, 0x80070057
xor edx, edx
test edi, edi
mov eax, edi
jl 0x403f2d
mov ecx, esi
sub ecx, edx
add edx, ebp
mov eax, ebx
call fcn.004013f0
test eax, eax
jge 0x403f3f
movzx esi, ax
jmp 0x403ff9
mov edx, esi
sub edx, ecx
jmp 0x403f1a
lea edi, [esi + esi]
push edi
call fcn.0040885b
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x14], ebx
jne 0x403f7e
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 4]
test esi, esi
jne 0x403f63
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 0x404074
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 0x403fed
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 0x403fd9
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 4]
test esi, esi
jne 0x403fba
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 0x404074
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
jne 0x404022
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 4]
test eax, eax
jne 0x404007
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]
add esp, 8
jmp 0x404074
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov eax, dword [esp + 0x24]
jne 0x40405a
mov edx, dword [eax + 4]
test edx, edx
jne 0x40403c
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]
add esp, 8
mov esi, 2
jmp 0x404074
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
push ebx
push ebx
push eax
push ecx
mov ecx, dword [esp + 0x38]
call fcn.004044f0
add esp, 0x10
mov esi, eax
push ebp
call fcn.00407d45
add esp, 4
test ebx, ebx
je 0x40408a
push ebx
call fcn.00407d45
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret