Function at 0x4017d0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x28
push ebp
mov ebp, ecx
push esi
push edi
mov al, byte [ebp + 0x12828]
mov dword [esp + 0x24], ebp
test al, al
jne 0x4017fd
mov ecx, dword [ebp + 4]
lea eax, [ebp + 0xc]
push ecx
push 1
push 4
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
jmp 0x40181e
mov eax, dword [ebp + 0x12848]
mov edx, dword [ebp + 0x12840]
mov ecx, dword [edx + eax]
add eax, 4
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x1283c], ecx
mov dword [ebp + 0x12848], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x401ad0
mov ecx, ebp
call fcn.00401520
mov ecx, ebp
call fcn.00401360
lea edi, [ebp + 0x18]
mov ecx, 0x3f1
mov eax, 0x20202020
mov esi, 0xfc4
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
test eax, eax
mov dword [esp + 0x10], esi
jbe 0x401ad0
push ebx
jmp 0x401863
mov esi, dword [esp + 0x14]
mov ecx, ebp
call fcn.00401550
mov ebx, eax
cmp ebx, 0x100
jge 0x4018c0
mov al, byte [ebp + 0x12828]
test al, al
jne 0x40188e
mov eax, dword [ebp + 8]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_putc]
add esp, 8
jmp 0x4018ab
mov eax, dword [ebp + 0x12834]
lea ecx, [ebp + 0x1282c]
lea edx, [esp + 0x13]
mov byte [esp + 0x13], bl
push edx
push 1
push eax
call fcn.00404900
mov byte [esi + ebp + 0x18], bl
inc esi
and esi, 0xfff
inc edi
mov dword [esp + 0x14], esi
jmp 0x401ab7
mov ecx, ebp
call fcn.00401690
mov ecx, eax
mov eax, esi
sub eax, ecx
add ebx, 0xffffff03
dec eax
xor ecx, ecx
and eax, 0xfff
mov dword [esp + 0x30], ebx
test ebx, ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
jle 0x401ab7
add edi, ebx
mov dword [esp + 0x34], edi
jmp 0x4018fb
mov eax, dword [esp + 0x1c]
add ecx, eax
mov al, byte [ebp + 0x12828]
and ecx, 0xfff
xor ebx, ebx
test al, al
mov bl, byte [ecx + ebp + 0x18]
mov dword [esp + 0x2c], ebx
jne 0x40192a
mov edx, dword [ebp + 8]
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_putc]
add esp, 8
jmp 0x401a8c
mov eax, dword [ebp + 0x12834]
mov ecx, dword [ebp + 0x12838]
lea esi, [ebp + 0x1282c]
sub ecx, eax
cmp ecx, 1
mov byte [esp + 0x13], bl
mov edi, eax
jae 0x401a11
mov edx, dword [esi + 4]
test edx, edx
je 0x40195d
mov ecx, eax
sub ecx, edx
cmp ecx, 1
ja 0x401962
mov ecx, 1
test edx, edx
jne 0x40196a
xor eax, eax
jmp 0x40196c
sub eax, edx
add eax, ecx
test eax, eax
mov dword [esp + 0x24], eax
jge 0x401978
xor eax, eax
push eax
call sub.MFC42.DLL_operatornew
mov ebp, dword [esi + 4]
add esp, 4
cmp ebp, edi
mov dword [esp + 0x20], eax
mov ebx, eax
je 0x40199e
push ebp
push ebx
call fcn.00404b40
add esp, 8
inc ebx
inc ebp
cmp ebp, edi
jne 0x40198e
lea edx, [esp + 0x13]
push edx
push ebx
call fcn.00404b40
mov ebp, dword [esi + 8]
add esp, 8
cmp edi, ebp
je 0x4019c4
inc ebx
push edi
push ebx
call fcn.00404b40
add esp, 8
inc edi
inc ebx
cmp edi, ebp
jne 0x4019b4
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push eax
push ecx
mov ecx, esi
call fcn.00404ad0
mov edx, dword [esi + 4]
push edx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
add esp, 4
lea edx, [eax + ecx]
mov dword [esi + 0xc], edx
mov edx, dword [esi + 4]
test edx, edx
jne 0x4019f8
xor ecx, ecx
jmp 0x4019fd
mov ecx, dword [esi + 8]
sub ecx, edx
mov ebp, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
lea ecx, [ecx + eax + 1]
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
jmp 0x401a8c
mov ecx, eax
sub ecx, edi
cmp ecx, 1
jae 0x401a51
lea edx, [edi + 1]
mov ecx, esi
push edx
push eax
push edi
call fcn.00404ae0
mov eax, dword [esi + 8]
mov edx, edi
sub edx, eax
lea ecx, [esp + 0x13]
inc edx
push ecx
push edx
push eax
mov ecx, esi
call fcn.00404b10
mov eax, dword [esi + 8]
cmp edi, eax
je 0x401a89
mov cl, byte [esp + 0x13]
mov byte [edi], cl
inc edi
cmp edi, eax
jne 0x401a44
jmp 0x401a89
lea ecx, [eax - 1]
push eax
push eax
mov dword [esp + 0x34], ecx
push ecx
mov ecx, esi
call fcn.00404ae0
mov ecx, dword [esi + 8]
lea eax, [ecx - 1]
cmp edi, eax
je 0x401a77
mov dl, byte [eax - 1]
dec eax
dec ecx
cmp eax, edi
mov byte [ecx], dl
jne 0x401a6c
lea eax, [edi + 1]
cmp edi, eax
je 0x401a89
mov cl, byte [esp + 0x13]
mov byte [edi], cl
inc edi
cmp edi, eax
jne 0x401a7e
inc dword [esi + 8]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov byte [eax + ebp + 0x18], bl
inc eax
and eax, 0xfff
inc ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x30]
cmp ecx, eax
mov dword [esp + 0x18], ecx
jl 0x4018f7
mov edi, dword [esp + 0x34]
mov eax, dword [ebp + 0x14]
cmp edi, eax
jbe 0x401ac6
add eax, 0x400
mov dword [ebp + 0x14], eax
cmp edi, dword [ebp + 0xc]
jb 0x40185f
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x28
ret