Function at 0x407c50
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x2c
push ebp
mov ebp, ecx
mov dword [esp + 0x20], ebp
mov al, byte [ebp + 0x12828]
test al, al
jne 0x407c8c
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
cmp eax, 1
jae 0x407cc2
push str.Read_Error
mov ecx, ebp
call fcn.00407740
jmp 0x407cc2
cmp dword [ebp + 0x12844], 4
jae 0x407ca1
push str.Read_Error
mov ecx, ebp
call fcn.00407740
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 0x407f8c
push esi
push edi
mov ecx, ebp
call fcn.004079a0
mov ecx, ebp
call fcn.004077e0
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 0x407f7b
push ebx
jmp 0x407d09
mov esi, dword [esp + 0x14]
mov ecx, ebp
call fcn.004079d0
mov ebx, eax
cmp ebx, 0x100
jge 0x407d66
mov al, byte [ebp + 0x12828]
test al, al
jne 0x407d34
mov eax, dword [ebp + 8]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_putc]
add esp, 8
jmp 0x407d51
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.00408260
mov byte [esi + ebp + 0x18], bl
inc esi
and esi, 0xfff
inc edi
mov dword [esp + 0x14], esi
jmp 0x407f52
mov ecx, ebp
call fcn.00407b10
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 0x407f52
add edi, ebx
mov dword [esp + 0x34], edi
jmp 0x407da1
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 + 0x28], ebx
jne 0x407dd0
mov edx, dword [ebp + 8]
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_putc]
add esp, 8
jmp 0x407f27
mov eax, dword [ebp + 0x12834]
mov ecx, dword [ebp + 0x12838]
lea edi, [ebp + 0x1282c]
sub ecx, eax
cmp ecx, 1
mov byte [esp + 0x13], bl
mov esi, eax
jae 0x407eac
mov edx, dword [edi + 4]
test edx, edx
je 0x407e03
mov ecx, eax
sub ecx, edx
cmp ecx, 1
ja 0x407e08
mov ecx, 1
test edx, edx
jne 0x407e10
xor eax, eax
jmp 0x407e12
sub eax, edx
add eax, ecx
test eax, eax
mov dword [esp + 0x24], eax
jge 0x407e1e
xor eax, eax
push eax
call sub.MFC42.DLL_operatornew
mov ebp, dword [edi + 4]
add esp, 4
cmp ebp, esi
mov dword [esp + 0x20], eax
mov ebx, eax
je 0x407e44
push ebp
push ebx
call fcn.00408490
add esp, 8
inc ebx
inc ebp
cmp ebp, esi
jne 0x407e34
lea edx, [esp + 0x13]
push edx
push ebx
call fcn.00408490
mov ebp, dword [edi + 8]
add esp, 8
cmp esi, ebp
je 0x407e6a
inc ebx
push esi
push ebx
call fcn.00408490
add esp, 8
inc esi
inc ebx
cmp esi, ebp
jne 0x407e5a
mov eax, dword [edi + 4]
push eax
mov dword [esp + 0x3c], eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
add esp, 4
lea edx, [eax + ecx]
mov ecx, dword [edi + 4]
test ecx, ecx
mov dword [edi + 0xc], edx
jne 0x407e93
xor edx, edx
jmp 0x407e98
mov edx, dword [edi + 8]
sub edx, ecx
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
lea ecx, [edx + eax + 1]
mov dword [edi + 4], eax
mov dword [edi + 8], ecx
jmp 0x407f27
mov ecx, eax
sub ecx, esi
cmp ecx, 1
jae 0x407eec
lea edx, [esi + 1]
mov ecx, edi
push edx
push eax
push esi
call fcn.00408430
mov eax, dword [edi + 8]
mov edx, esi
sub edx, eax
lea ecx, [esp + 0x13]
inc edx
push ecx
push edx
push eax
mov ecx, edi
call fcn.00408460
mov eax, dword [edi + 8]
cmp esi, eax
je 0x407f24
mov cl, byte [esp + 0x13]
mov byte [esi], cl
inc esi
cmp esi, eax
jne 0x407edf
jmp 0x407f24
lea ecx, [eax - 1]
push eax
push eax
mov dword [esp + 0x40], ecx
push ecx
mov ecx, edi
call fcn.00408430
mov ecx, dword [edi + 8]
lea eax, [ecx - 1]
cmp esi, eax
je 0x407f12
mov dl, byte [eax - 1]
dec eax
dec ecx
cmp eax, esi
mov byte [ecx], dl
jne 0x407f07
lea eax, [esi + 1]
cmp esi, eax
je 0x407f24
mov cl, byte [esp + 0x13]
mov byte [esi], cl
inc esi
cmp esi, eax
jne 0x407f19
inc dword [edi + 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 0x407d9d
mov edi, dword [esp + 0x34]
cmp edi, dword [ebp + 0x14]
jbe 0x407f71
push edi
push str._12lu_r
call dword [sym.imp.MSVCRT.dll_printf]
mov eax, dword [ebp + 0x14]
add esp, 8
add eax, 0x400
mov dword [ebp + 0x14], eax
cmp edi, dword [ebp + 0xc]
jb 0x407d05
pop ebx
push edi
push str._12lu_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
pop edi
pop esi
pop ebp
add esp, 0x2c
ret