Function at 0x404ca0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x328
mov eax, dword [0x4190cc]
xor eax, esp
mov dword [esp + 0x324], eax
mov eax, dword [esp + 0x330]
mov ecx, dword [esp + 0x338]
mov edx, dword [esp + 0x33c]
push ebx
push ebp
push esi
xor esi, esi
dec dword [esp + 0x340]
push edi
mov edi, dword [esp + 0x33c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x14], esi
lea ecx, [ecx]
cmp esi, dword [esp + 0x344]
jge 0x404daf
lea ecx, [ecx]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [esp + 0x14]
push eax
push 0x200
lea ecx, [esp + 0x38]
push ecx
push edi
call ebx
test eax, eax
je 0x404db5
mov eax, dword [esp + 0x10]
test eax, eax
je 0x404e42
push eax
lea edx, [esp + 0x30]
push 0
push edx
mov byte [esp + eax + 0x38], 0
call fcn.004098f0
mov ebx, eax
mov eax, dword [esp + 0x350]
add esp, 0xc
sub eax, esi
test ebx, ebx
je 0x404d7d
mov ecx, ebx
lea edx, [esp + 0x2c]
sub ecx, edx
cmp eax, ecx
mov ebp, eax
jl 0x404d62
mov ebp, ecx
mov eax, ebx
sub eax, dword [esp + 0x10]
push 1
lea ecx, [esp + 0x30]
sub eax, ecx
push 0
inc eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x404d87
mov ebp, dword [esp + 0x10]
cmp eax, ebp
jge 0x404d87
mov ebp, eax
mov eax, dword [esp + 0x18]
push ebp
lea edx, [esp + 0x30]
push edx
add eax, esi
push eax
call fcn.00408ba0
add esp, 0xc
add esi, ebp
test ebx, ebx
jne 0x404daf
cmp esi, dword [esp + 0x344]
jl 0x404d00
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x18]
mov byte [ecx + esi], 0
test esi, esi
je 0x404eeb
cmp dword [esp + 0x14], 0x103
jge 0x404e69
push 0
lea edx, [esp + 0x14]
push edx
push 0x200
lea eax, [esp + 0x38]
push eax
push edi
call ebx
test eax, eax
je 0x404e69
mov eax, dword [esp + 0x10]
test eax, eax
je 0x404e69
push eax
lea ecx, [esp + 0x30]
push 0
push ecx
mov byte [esp + eax + 0x38], 0
call fcn.004098f0
mov esi, eax
mov eax, 0x103
sub eax, dword [esp + 0x20]
add esp, 0xc
test esi, esi
je 0x404e49
mov ecx, esi
lea edx, [esp + 0x2c]
sub ecx, edx
cmp eax, ecx
mov ebp, eax
jl 0x404e27
mov ebp, ecx
mov eax, esi
sub eax, dword [esp + 0x10]
push 1
lea ecx, [esp + 0x30]
sub eax, ecx
push 0
inc eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x404e53
xor esi, esi
jmp 0x404db5
mov ebp, dword [esp + 0x10]
cmp eax, ebp
jge 0x404e53
mov ebp, eax
add dword [esp + 0x14], ebp
test esi, esi
jne 0x404e69
cmp dword [esp + 0x14], 0x103
jl 0x404dd3
mov edx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x2c]
push ecx
push edi
mov byte [esp + edx + 0x244], 0
call ebx
push 0
lea edx, [esp + 0x14]
push edx
push 0x18
lea eax, [esp + 0x38]
push eax
push edi
call ebx
push 0
lea ecx, [esp + 0x14]
push ecx
push 4
lea edx, [esp + 0x28]
push edx
push edi
call ebx
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x38]
push ecx
push edi
call ebx
mov eax, dword [esp + 0x24]
push 0
lea edx, [esp + 0x14]
push edx
push 4
push eax
push edi
call ebx
test byte [esp + 0x20], 0x10
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
mov dword [eax], ecx
mov dword [eax + 4], 0
mov esi, 1
jne 0x404cf0
mov ecx, dword [esp + 0x334]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00408b84
add esp, 0x328
ret 0x14