Function at 0x401550
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 0x40158d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
mov ecx, dword [esp + 0x14]
push 0x43c058
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
cmp eax, ebp
mov dword [esi], eax
jne 0x4015af
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 edx, [esp + 0x1c]
push 1
push edx
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_strncmp]
push 3
lea eax, [esp + 0x28]
push 0x43c054
push eax
call ebx
add esp, 0x1c
test eax, eax
jne 0x4017b4
mov ecx, dword [esi]
lea ebp, [esi + 0xc]
push ecx
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 0x4017b2
mov edx, dword [esi]
mov ebp, 1
push edx
push 2
lea eax, [esi + 0x628]
push ebp
push eax
call edi
mov ecx, dword [esi]
lea edx, [esi + 0x62a]
push ecx
push 2
push ebp
push edx
call edi
mov eax, dword [esi]
mov bl, 0x10
add esp, 0x20
test byte [eax + 0xc], bl
jne 0x4017b2
push eax
push ebp
lea eax, [esp + 0x20]
push ebp
push eax
call edi
mov eax, dword [esp + 0x28]
add esp, 0x10
test al, 0x80
je 0x401656
mov dword [esi + 0x62c], ebp
jmp 0x401660
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 0x4016a5
test al, 8
je 0x40168d
mov dword [esi + 0x634], ebp
jmp 0x401697
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 0x4017b2
mov ecx, dword [esi + 0x62c]
test ecx, ecx
je 0x401716
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 0x401720
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 0x4017b2
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x4017e5
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 0x4017b2
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 0x4017cf
mov eax, dword [esi + 0x61c]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi + 0x61c], 0
xor ebp, ebp
mov eax, dword [esi]
cmp eax, ebp
je 0x4017c6
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [esi], ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
mov eax, dword [esi]
test eax, eax
je 0x4017e5
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [esi], 0
mov dword [esi + 0x14], ebp
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
ret 8