Function at 0x4025c0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x408e78
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x40e018]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x38]
xor edi, edi
cmp ebp, edi
jne 0x402635
mov edi, dword [esp + 0x34]
cmp byte [edi + 0x2c], 0
jne 0x40262e
mov byte [edi + 0x2c], 1
mov dword [edi + 0x30], 2
mov ebx, dword [str.Failed_to_open_file]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402611
sub eax, edx
lea ecx, [edi + 0x34]
push ecx
mov esi, eax
call fcn.00401130
or eax, 0xffffffff
mov dword [edi + 0x40], eax
mov dword [edi + 0x3c], eax
xor al, al
jmp 0x4028e7
mov ebx, dword [esp + 0x34]
mov esi, dword [ebx + 0x18]
cmp esi, edi
je 0x402651
mov ecx, esi
mov edx, dword [ecx]
mov eax, dword [edx]
mov esi, dword [esi + 0x28]
push 1
call eax
cmp esi, edi
jne 0x402640
push 2
mov dword [ebx + 0x18], edi
mov dword [ebx + 0x1c], edi
or eax, 0xffffffff
push edi
mov edi, dword [sym.imp.MSVCR90.dll_fseek]
push ebp
mov dword [ebx + 8], eax
mov dword [ebx + 4], eax
call edi
push ebp
call dword [sym.imp.MSVCR90.dll_ftell]
push 0
push 0
push ebp
mov esi, eax
call edi
add esp, 0x1c
test esi, esi
jne 0x4026ca
cmp byte [ebx + 0x2c], 0
jne 0x4026c3
mov byte [ebx + 0x2c], 1
mov dword [ebx + 0x30], 0xd
mov edx, dword [str.Error_document_empty.]
mov eax, edx
lea esi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4026a0
add ebx, 0x34
sub eax, esi
push ebx
mov esi, eax
mov ebx, edx
call fcn.00401130
mov eax, dword [esp + 0x34]
or ecx, 0xffffffff
mov dword [eax + 0x40], ecx
mov dword [eax + 0x3c], ecx
xor al, al
jmp 0x4028e7
mov dword [esp + 0x14], 0x40e588
lea ecx, [esp + 0x14]
push ecx
mov edi, esi
mov dword [esp + 0x30], 0
call fcn.00401070
lea edx, [esi + 1]
push edx
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
push ebp
mov edi, eax
push 1
push esi
push edi
mov dword [esp + 0x30], edi
mov byte [edi], 0
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x14
cmp eax, 1
je 0x402776
push edi
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp byte [ebx + 0x2c], 0
jne 0x402753
mov byte [ebx + 0x2c], 1
mov dword [ebx + 0x30], 2
mov edx, dword [str.Failed_to_open_file]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402730
add ebx, 0x34
sub eax, esi
push ebx
mov esi, eax
mov ebx, edx
call fcn.00401130
mov eax, dword [esp + 0x34]
or ecx, 0xffffffff
mov dword [eax + 0x40], ecx
mov dword [eax + 0x3c], ecx
mov dword [esp + 0x2c], 0xffffffff
mov eax, dword [esp + 0x14]
cmp eax, 0x40e588
je 0x40276f
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
xor al, al
jmp 0x4028e7
mov byte [edi + esi], 0
cmp byte [edi], 0
mov esi, dword [esp + 0x14]
mov eax, edi
mov dword [esp + 0x18], eax
mov ebp, edi
je 0x40287c
nop
mov cl, byte [ebp]
cmp cl, 0xa
jne 0x4027f2
mov edi, dword [esi]
mov ebx, ebp
sub ebx, eax
inc ebx
add edi, ebx
mov dword [esp + 0x20], edi
cmp edi, dword [esi + 4]
jbe 0x4027c5
mov esi, dword [esi + 4]
lea eax, [esp + 0x14]
add edi, esi
push eax
call fcn.00401070
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
mov ecx, dword [esi]
push ebx
push eax
lea edx, [ecx + esi + 8]
push edx
call dword [sym.imp.MSVCR90.dll_memmove]
mov ebx, dword [esp + 0x40]
add esp, 0xc
mov dword [esi], edi
inc ebp
mov byte [edi + esi + 8], 0
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x18], ebp
mov eax, ebp
jmp 0x402872
cmp cl, 0xd
jne 0x402871
mov ecx, ebp
sub ecx, eax
test ecx, ecx
jle 0x40280e
push ecx
push eax
lea ebx, [esp + 0x1c]
call fcn.00401210
mov esi, dword [esp + 0x14]
mov byte [esp + 0x38], 0xa
mov eax, dword [esi]
lea ebx, [eax + 1]
cmp ebx, dword [esi + 4]
jbe 0x402835
mov esi, dword [esi + 4]
lea eax, [esp + 0x14]
lea edi, [esi + ebx]
push eax
call fcn.00401070
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
mov edx, dword [esi]
push 1
lea ecx, [esp + 0x3c]
push ecx
lea eax, [edx + esi + 8]
push eax
call dword [sym.imp.MSVCR90.dll_memmove]
mov dword [esi], ebx
mov byte [ebx + esi + 8], 0
mov ebx, dword [esp + 0x40]
add esp, 0xc
cmp byte [ebp + 1], 0xa
jne 0x402868
add ebp, 2
mov dword [esp + 0x18], ebp
mov eax, ebp
jmp 0x402872
inc ebp
mov dword [esp + 0x18], ebp
mov eax, ebp
jmp 0x402872
inc ebp
cmp byte [ebp], 0
jne 0x402790
sub ebp, eax
je 0x402893
push ebp
push eax
lea ebx, [esp + 0x1c]
call fcn.00401210
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x34]
push edi
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
mov edx, dword [ebx]
mov edx, dword [edx + 8]
add esp, 4
push 0
push 0
lea eax, [esi + 8]
push eax
mov ecx, ebx
call edx
mov dword [esp + 0x2c], 0xffffffff
cmp byte [ebx + 0x2c], 0
je 0x4028d4
cmp esi, 0x40e588
je 0x40276f
push esi
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
xor al, al
jmp 0x4028e7
cmp esi, 0x40e588
je 0x4028e5
push esi
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 8