Function at 0x401070
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x14]
cmp eax, ebp
mov dword [esi + 0x61c], ebp
mov dword [esi + 0x620], ebp
mov dword [esi + 0x660], ebp
mov dword [esi + 0x664], ebp
mov dword [esi + 0x680], ebp
je 0x4010ad
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
mov eax, dword [esp + 0x14]
cmp eax, ebp
mov dword [esi], eax
jne 0x4010c0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push eax
push 3
lea ecx, [esp + 0x1c]
push 1
push ecx
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_strncmp]
push 3
lea edx, [esp + 0x28]
push 0x43c054
push edx
call ebx
add esp, 0x1c
test eax, eax
jne 0x4012c5
mov eax, dword [esi]
lea ebp, [esi + 0xc]
push eax
push 3
push 1
push ebp
call edi
push 3
push 0x43c050
push ebp
mov byte [esi + 0xf], 0
call ebx
add esp, 0x1c
test eax, eax
jg 0x4012c3
mov ecx, dword [esi]
mov ebp, 1
push ecx
push 2
lea edx, [esi + 0x628]
push ebp
push edx
call edi
mov eax, dword [esi]
lea ecx, [esi + 0x62a]
push eax
push 2
push ebp
push ecx
call edi
mov eax, dword [esi]
mov bl, 0x10
add esp, 0x20
test byte [eax + 0xc], bl
jne 0x4012c3
push eax
push ebp
lea edx, [esp + 0x20]
push ebp
push edx
call edi
mov eax, dword [esp + 0x28]
add esp, 0x10
test al, 0x80
je 0x401167
mov dword [esi + 0x62c], ebp
jmp 0x401171
mov dword [esi + 0x62c], 0
mov ecx, eax
and ecx, 0xff
mov edx, ecx
shr edx, 4
and edx, 7
inc edx
mov dword [esi + 0x630], edx
mov edx, dword [esi + 0x62c]
test edx, edx
je 0x4011b6
test al, 8
je 0x40119e
mov dword [esi + 0x634], ebp
jmp 0x4011a8
mov dword [esi + 0x634], 0
and ecx, 7
mov eax, ebp
inc ecx
shl eax, cl
mov dword [esi + 0x638], eax
mov ecx, dword [esi]
lea edx, [esp + 0x18]
push ecx
push ebp
push ebp
push edx
call edi
mov ecx, dword [esi]
mov eax, dword [esp + 0x28]
push ecx
push ebp
lea edx, [esp + 0x30]
and eax, 0xff
push ebp
push edx
mov dword [esi + 0x63c], eax
call edi
mov eax, dword [esp + 0x38]
add esp, 0x20
and eax, 0xff
mov dword [esi + 0x640], eax
mov eax, dword [esi]
test byte [eax + 0xc], bl
jne 0x4012c3
mov ecx, dword [esi + 0x62c]
test ecx, ecx
je 0x401227
push eax
mov eax, dword [esi + 0x638]
lea ebp, [esi + 0x1c]
lea ecx, [eax + eax*2]
push ecx
push 1
push ebp
call edi
mov dword [esi + 0x644], ebp
add esp, 0x10
mov ebp, 1
jmp 0x401231
mov dword [esi + 0x644], 0
mov edx, dword [esi]
push edx
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov ecx, esi
mov dword [esi + 8], eax
call fcn.00401800
test eax, eax
mov dword [esi + 0x624], eax
je 0x4012c3
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x4012df
lea ecx, [eax*8]
sub ecx, eax
shl ecx, 3
push ecx
call sub.MFC42.DLL_operatornew
mov edi, eax
add esp, 4
test edi, edi
mov dword [esi + 0x61c], edi
je 0x4012c3
mov eax, dword [esi + 0x624]
lea ecx, [eax*8]
sub ecx, eax
xor eax, eax
shl ecx, 3
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, esi
call fcn.00401e40
test eax, eax
jne 0x4012d4
mov eax, dword [esi + 0x61c]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi + 0x61c], 0
xor ebp, ebp
cmp dword [esi], ebp
je 0x4012cb
mov dword [esi], ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
cmp dword [esi], 0
je 0x4012df
mov dword [esi], 0
mov dword [esi + 0x14], ebp
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
ret 8