Function at 0x408840
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41a848
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42cf18]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x1c], ebx
mov ebp, dword [esp + 0x30]
xor edi, edi
cmp ebp, edi
jne 0x408888
push edi
push edi
push edi
push 2
call fcn.0040b0d0
xor al, al
jmp 0x408ab5
mov esi, dword [ebx + 0x18]
cmp esi, edi
je 0x4088a1
nop
mov ecx, esi
mov eax, dword [ecx]
mov edx, dword [eax]
mov esi, dword [esi + 0x28]
push 1
call edx
cmp esi, edi
jne 0x408890
mov esi, dword [sym.imp.MSVCR80.dll_fseek]
push 2
or eax, 0xffffffff
mov dword [ebx + 0x18], edi
mov dword [ebx + 0x1c], edi
push edi
push ebp
mov dword [ebx + 8], eax
mov dword [ebx + 4], eax
call esi
push ebp
call dword [sym.imp.MSVCR80.dll_ftell]
push 0
push 0
push ebp
mov edi, eax
call esi
add esp, 0x1c
test edi, edi
jg 0x4088e9
push 0
push 0
push 0
push 0xd
mov ecx, ebx
call fcn.0040b0d0
xor al, al
jmp 0x408ab5
mov dword [esp + 0x14], 0x42e9d8
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], 0
call fcn.0040a890
lea eax, [edi + 1]
push eax
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
push ebp
push 1
mov ebx, eax
push edi
push ebx
mov byte [ebx], 0
call dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x14
cmp eax, 1
je 0x408961
push ebx
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
mov ecx, dword [esp + 0x20]
add esp, 4
push 0
push 0
push 0
push 2
call fcn.0040b0d0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
cmp eax, 0x42e9d8
je 0x40895a
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
xor al, al
jmp 0x408ab5
lea eax, [ebx + edi]
mov byte [eax], 0
cmp byte [ebx], 0
mov ebp, ebx
mov esi, ebx
mov dword [esp + 0x18], eax
je 0x408a59
mov edi, dword [sym.imp.MSVCR80.dll__wassert]
jmp 0x408984
mov eax, dword [esp + 0x18]
cmp esi, eax
jb 0x40899c
push 0x410
push 0x41fda8
push str.p____buflength_
call edi
add esp, 0xc
mov al, byte [esi]
cmp al, 0xa
jne 0x4089d9
mov ecx, esi
sub ecx, ebp
add ecx, 1
push ecx
push ebp
lea ecx, [esp + 0x1c]
call fcn.0040aa20
add esi, 1
cmp esi, dword [esp + 0x18]
mov ebp, esi
jbe 0x408a50
push 0x417
push 0x41fda8
push 0x41ffb0
call edi
add esp, 0xc
jmp 0x408a50
cmp al, 0xd
jne 0x408a4d
mov eax, esi
sub eax, ebp
test eax, eax
jle 0x4089f0
push eax
push ebp
lea ecx, [esp + 0x1c]
call fcn.0040aa20
push 1
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x38], 0xa
call fcn.0040aa20
cmp byte [esi + 1], 0xa
jne 0x408a2c
add esi, 2
cmp esi, dword [esp + 0x18]
mov ebp, esi
jbe 0x408a50
push 0x425
push 0x41fda8
push 0x41ffb0
call edi
add esp, 0xc
jmp 0x408a50
add esi, 1
cmp esi, dword [esp + 0x18]
mov ebp, esi
jbe 0x408a50
push 0x42b
push 0x41fda8
push 0x41ffb0
call edi
add esp, 0xc
jmp 0x408a50
add esi, 1
cmp byte [esi], 0
jne 0x408980
sub esi, ebp
je 0x408a68
push esi
push ebp
lea ecx, [esp + 0x1c]
call fcn.0040aa20
push ebx
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov eax, dword [esi]
mov eax, dword [eax + 8]
add esp, 4
push ecx
push 0
add edx, 8
push edx
mov ecx, esi
call eax
cmp byte [esi + 0x2c], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
jne 0x40894a
cmp eax, 0x42e9d8
je 0x408ab3
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8