Function at 0x401020
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x4010a2
push 0
mov ecx, dword [ebp + 8]
push ecx
push str.Error_Opening_File_for_Reading
mov edx, dword [0x58fee4]
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x40127a
push 0
lea eax, [ebp - 0x34]
push eax
push 2
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x34]
push eax
push 2
mov ecx, dword [ebp + 0xc]
add ecx, 2
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x34]
push eax
push 2
mov ecx, dword [ebp + 0xc]
add ecx, 4
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 4]
xor ecx, ecx
mov edx, 0x10
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00416f01
add esp, 4
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x38]
mov dword [eax + 8], ecx
push 0x10
call fcn.00416f01
add esp, 4
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x10], 0
jmp 0x40113b
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 0xc]
movzx edx, word [ecx + 4]
cmp dword [ebp - 0x10], edx
jge 0x401168
push 0
lea eax, [ebp - 0x34]
push eax
push 0x10
mov ecx, dword [ebp - 0x10]
shl ecx, 4
mov edx, dword [ebp + 0xc]
add ecx, dword [edx + 8]
push ecx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x401132
mov ecx, dword [ebp + 0xc]
movzx eax, word [ecx + 4]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00416f01
add esp, 4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], 0
jmp 0x4011a3
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 0xc]
movzx eax, word [edx + 4]
cmp dword [ebp - 0x10], eax
jge 0x40126d
mov ecx, dword [ebp - 0x10]
shl ecx, 4
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
mov ecx, dword [eax + ecx + 8]
push ecx
call fcn.00515646
add esp, 4
mov dword [ebp - 0x30], eax
push 0
push 0
mov edx, dword [ebp - 0x10]
shl edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + edx + 0xc]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x10]
shl edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + edx + 8]
push edx
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x10]
shl edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
mov edx, dword [ecx + edx + 8]
push edx
call fcn.00515646
add esp, 4
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
mov dword [edx + ecx*4], eax
mov eax, dword [ebp - 0x10]
shl eax, 4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
mov eax, dword [edx + eax + 8]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + edx*4]
push ecx
call fcn.00515710
add esp, 0xc
mov edx, dword [ebp - 0x30]
push edx
call fcn.00515569
add esp, 4
jmp 0x40119a
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret