Function at 0x4139f0
Capabilities:
Check if file exists
Get file attributes
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc54
push ebx
mov ebx, ecx
mov eax, dword [ebx + 4]
test eax, eax
push esi
push edi
je 0x413b9f
mov al, byte [ebp + 0xc]
test al, al
mov esi, dword [ebp + 8]
jne 0x413a2c
push 0x46a108
push esi
call fcn.004265a0
add esp, 8
cmp eax, esi
je 0x413b9f
push 0x3a
push esi
call fcn.00426460
add esp, 8
test eax, eax
push esi
lea eax, [esp + 0x15c]
push eax
setne byte [esp + 0x1b]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x158]
push ecx
mov ecx, ebx
call fcn.004138e0
xor eax, eax
mov byte [esp + 0x50], 0
mov ecx, 0x40
lea edi, [esp + 0x51]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [ebp + 0xc]
test al, al
je 0x413ab5
lea edx, [esp + 0x260]
push edx
lea eax, [esp + 0x364]
push eax
push 0
push 0
push esi
call fcn.00425300
lea ecx, [esp + 0x274]
push ecx
lea edx, [esp + 0x378]
push edx
push 0
lea eax, [esp + 0x70]
push 0
push eax
call fcn.0042573d
add esp, 0x28
jmp 0x413b0f
mov al, byte [esp + 0x13]
test al, al
je 0x413ae6
lea edi, [ebx + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
push esi
call fcn.0042651e
add esp, 0xc
test eax, eax
jne 0x413b9f
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, esi
push eax
jmp 0x413b04
push 0x46a10c
push esi
call fcn.004265a0
add esp, 8
cmp eax, esi
jne 0x413b03
lea edx, [esi + 2]
push edx
lea eax, [esp + 0x54]
push eax
jmp 0x413b09
push esi
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x50]
push edx
mov ecx, ebx
call fcn.00413860
xor edi, edi
push esi
mov dword [esp + 0x4c], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and eax, 0xfffffffe
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x15c]
push ecx
mov ecx, ebx
call fcn.00413930
movzx edx, word [esp + 0x1c]
movzx eax, word [esp + 0x1e]
movzx ecx, word [esp + 0x22]
push edi
push 1
push 3
mov dword [esp + 0x4c], edx
movzx edx, word [esp + 0x30]
push edi
dec eax
push edi
mov dword [esp + 0x50], eax
movzx eax, word [esp + 0x3a]
mov dword [esp + 0x4c], ecx
movzx ecx, word [esp + 0x3c]
mov dword [esp + 0x48], edx
push SysReAllocStringLen
lea edx, [esp + 0x170]
push edx
mov dword [esp + 0x60], edi
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x413baa
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebx + 4]
push 0xffffffffffffffff
push 8
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x70]
push ecx
push edx
call fcn.00416fb0
mov esi, eax
xor eax, eax
cmp esi, eax
jne 0x413c3c
inc dword [ebx + 0x110]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
push 0
lea eax, [esp + 0x1c]
push eax
push 0x800
lea ecx, [esp + 0x46c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x413c2a
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
add edx, eax
test eax, eax
mov dword [esp + 0x14], edx
je 0x413c2a
push eax
mov eax, dword [ebx + 4]
lea edx, [esp + 0x464]
push edx
push eax
call fcn.00416ff0
mov esi, eax
test esi, esi
je 0x413be1
mov eax, dword [ebx + 0x118]
mov ecx, dword [esp + 0x14]
add eax, ecx
mov dword [ebx + 0x118], eax
mov edx, dword [ebx + 4]
push edx
call fcn.004173e0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
test esi, esi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret 8