Function at 0x401040
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x406082
push eax
mov eax, 0x15288
mov dword fs:[0], esp
call fcn.00405e50
push ebx
push ebp
push esi
mov esi, dword [esp + 0x152a4]
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x10]
push ebx
push eax
lea ecx, [esp + 0x1c]
push 4
push ecx
push esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call edi
test eax, eax
je 0x40149e
push 1
push ebx
push 0xfffffffffffffffc
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x14]
cmp eax, 0x576453
jne 0x401132
push 0x1000
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
lea edx, [esp + 0x10]
mov ebp, eax
push ebx
push edx
push 0x1000
push ebp
push esi
call edi
test eax, eax
je 0x401490
cmp dword [esp + 0x10], 0x1000
jne 0x401490
lea ecx, [esp + 0x18]
call fcn.00402620
push ebp
lea ecx, [esp + 0x1c]
mov dword [esp + 0x152a4], ebx
call fcn.00402670
mov bl, al
lea eax, [esp + 0x18]
push eax
mov ecx, 0x4096e8
call fcn.00402d70
lea ecx, [esp + 0x18]
mov dword [esp + 0x152a0], 0xffffffff
call fcn.004029b0
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov al, bl
jmp 0x4014a0
cmp eax, 0x32576453
jne 0x4011d2
push 0x2000
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
lea ecx, [esp + 0x10]
mov ebp, eax
push ebx
push ecx
push 0x2000
push ebp
push esi
call edi
test eax, eax
je 0x401490
cmp dword [esp + 0x10], 0x2000
jne 0x401490
lea ecx, [esp + 0x168]
call fcn.004026c0
push ebp
lea ecx, [esp + 0x16c]
mov dword [esp + 0x152a4], 1
call fcn.00402710
lea edx, [esp + 0x168]
mov ecx, 0x4096e8
push edx
mov bl, al
call fcn.00402ea0
lea ecx, [esp + 0x168]
mov dword [esp + 0x152a0], 0xffffffff
call fcn.004029b0
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov al, bl
jmp 0x4014a0
cmp eax, 0x33576453
jne 0x401272
push 0x2000
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov ebp, eax
lea eax, [esp + 0x10]
push ebx
push eax
push 0x2000
push ebp
push esi
call edi
test eax, eax
je 0x401490
cmp dword [esp + 0x10], 0x2000
jne 0x401490
lea ecx, [esp + 0x168]
call fcn.00402760
push ebp
lea ecx, [esp + 0x16c]
mov dword [esp + 0x152a4], 2
call fcn.004027c0
lea ecx, [esp + 0x168]
mov bl, al
push ecx
mov ecx, 0x4096e8
call fcn.00402fe0
lea ecx, [esp + 0x168]
mov dword [esp + 0x152a0], 0xffffffff
call fcn.004029b0
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov al, bl
jmp 0x4014a0
cmp eax, 0x34576453
jne 0x401312
push 0x10000
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
lea edx, [esp + 0x10]
mov ebp, eax
push ebx
push edx
push 0x10000
push ebp
push esi
call edi
test eax, eax
je 0x401490
cmp dword [esp + 0x10], 0x10000
jne 0x401490
lea ecx, [esp + 0x13f8]
call fcn.004028d0
push ebp
lea ecx, [esp + 0x13fc]
mov dword [esp + 0x152a4], 3
call fcn.00402940
mov bl, al
lea eax, [esp + 0x13f8]
push eax
mov ecx, 0x4096e8
call fcn.00403120
lea ecx, [esp + 0x13f8]
mov dword [esp + 0x152a0], 0xffffffff
call fcn.004029b0
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov al, bl
jmp 0x4014a0
cmp eax, 0x35576453
jne 0x4013b2
push 0x10000
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
lea ecx, [esp + 0x10]
mov ebp, eax
push ebx
push ecx
push 0x10000
push ebp
push esi
call edi
test eax, eax
je 0x401490
cmp dword [esp + 0x10], 0x10000
jne 0x401490
lea ecx, [esp + 0x13f8]
call fcn.00402990
push ebp
lea ecx, [esp + 0x13fc]
mov dword [esp + 0x152a4], 4
call fcn.00402a60
lea edx, [esp + 0x13f8]
mov ecx, 0x4096e8
push edx
mov bl, al
call fcn.004032c0
lea ecx, [esp + 0x13f8]
mov dword [esp + 0x152a0], 0xffffffff
call fcn.004029b0
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov al, bl
jmp 0x4014a0
cmp eax, 0x36576453
jne 0x40144f
push 0x10000
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov ebp, eax
lea eax, [esp + 0x10]
push ebx
push eax
push 0x10000
push ebp
push esi
call edi
test eax, eax
je 0x401490
cmp dword [esp + 0x10], 0x10000
jne 0x401490
lea ecx, [esp + 0xb148]
call fcn.00402ab0
push ebp
lea ecx, [esp + 0xb14c]
mov dword [esp + 0x152a4], 5
call fcn.00402b90
lea ecx, [esp + 0xb148]
mov bl, al
push ecx
mov ecx, 0x4096e8
call fcn.00403480
lea ecx, [esp + 0xb148]
mov dword [esp + 0x152a0], 0xffffffff
call fcn.004029b0
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov al, bl
jmp 0x4014a0
cmp eax, 0x37576453
jne 0x40149e
push 0x10000
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
lea edx, [esp + 0x10]
mov ebp, eax
push ebx
push edx
push 0x10000
push ebp
push esi
call edi
test eax, eax
je 0x401490
cmp dword [esp + 0x10], 0x10000
jne 0x401490
push ebp
mov ecx, 0x4096e8
call fcn.00402d20
mov bl, al
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov al, bl
jmp 0x4014a0
xor al, al
mov ecx, dword [esp + 0x15298]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x15294
ret