Function at 0x41d600
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x570b58
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5d7050]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov esi, ecx
mov ebp, dword [esp + 0x30]
test esi, esi
jne 0x41d675
cmp byte [ebp + 0x2c], cl
jne 0x41d66e
mov byte [ebp + 0x2c], 1
mov dword [ebp + 0x30], 2
mov ebx, dword [str.Failed_to_open_file]
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41d650
sub eax, edx
lea edi, [ebp + 0x34]
mov esi, eax
call fcn.0041c0b0
or eax, 0xffffffff
mov dword [ebp + 0x40], eax
mov dword [ebp + 0x3c], eax
xor al, al
jmp 0x41d8ac
mov edi, ebp
call fcn.0041c910
mov ebx, dword [sym.imp.MSVCR80.dll_fseek]
push 2
or eax, 0xffffffff
push 0
push esi
mov dword [ebp + 8], eax
mov dword [ebp + 4], eax
call ebx
push esi
call dword [sym.imp.MSVCR80.dll_ftell]
push 0
push 0
push esi
mov edi, eax
call ebx
add esp, 0x1c
test edi, edi
jg 0x41d6d0
cmp byte [ebp + 0x2c], 0
jne 0x41d66e
mov byte [ebp + 0x2c], 1
mov dword [ebp + 0x30], 0xd
mov ebx, dword [str.Error_document_empty.]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41d6c5
jmp 0x41d659
mov dword [esp + 0x30], 0x5e96c0
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x2c], 0
call fcn.0041bff0
lea ecx, [edi + 1]
push ecx
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
push esi
mov ebx, eax
push 1
push edi
push ebx
mov dword [esp + 0x2c], ebx
mov byte [ebx], 0
call dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x14
cmp eax, 1
je 0x41d771
push ebx
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp byte [ebp + 0x2c], 0
jne 0x41d752
mov byte [ebp + 0x2c], 1
mov dword [ebp + 0x30], 2
mov ebx, dword [str.Failed_to_open_file]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41d734
sub eax, edx
lea edi, [ebp + 0x34]
mov esi, eax
call fcn.0041c0b0
or eax, 0xffffffff
mov dword [ebp + 0x40], eax
mov dword [ebp + 0x3c], eax
mov eax, dword [esp + 0x30]
cmp eax, 0x5e96c0
je 0x41d66e
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
xor al, al
jmp 0x41d8ac
mov edx, dword [ebp]
mov eax, dword [edx + 0x44]
push edi
push ebx
mov ecx, ebp
call eax
mov byte [ebx + edi], 0
cmp byte [ebx], 0
mov edi, dword [esp + 0x30]
mov ecx, ebx
mov dword [esp + 0x14], ecx
mov esi, ebx
je 0x41d845
mov al, byte [esi]
cmp al, 0xa
jne 0x41d7f3
mov ebx, dword [edi]
mov eax, esi
sub eax, ecx
add eax, 1
add ebx, eax
cmp ebx, dword [edi + 4]
mov dword [esp + 0x1c], eax
jbe 0x41d7cb
mov edi, dword [edi + 4]
lea ecx, [esp + 0x30]
add edi, ebx
push ecx
call fcn.0041bff0
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov edx, dword [edi]
push eax
push ecx
lea eax, [edx + edi + 8]
push eax
call dword [sym.imp.MSVCR80.dll_memmove]
add esp, 0xc
mov dword [edi], ebx
add esi, 1
mov byte [ebx + edi + 8], 0
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x14], esi
mov ecx, esi
jmp 0x41d83c
cmp al, 0xd
jne 0x41d839
mov eax, esi
sub eax, ecx
test eax, eax
jle 0x41d80a
push eax
push ecx
lea ebx, [esp + 0x38]
call fcn.0041c190
push 0xa
lea ebx, [esp + 0x34]
call fcn.0041c240
cmp byte [esi + 1], 0xa
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x18]
jne 0x41d82e
add esi, 2
mov dword [esp + 0x14], esi
mov ecx, esi
jmp 0x41d83c
add esi, 1
mov dword [esp + 0x14], esi
mov ecx, esi
jmp 0x41d83c
add esi, 1
cmp byte [esi], 0
jne 0x41d796
sub esi, ecx
je 0x41d85c
push esi
push ecx
lea ebx, [esp + 0x38]
call fcn.0041c190
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x18]
push ebx
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x38]
mov edx, dword [ebp]
mov edx, dword [edx + 8]
add esp, 4
push eax
push 0
lea ecx, [edi + 8]
push ecx
mov ecx, ebp
call edx
cmp byte [ebp + 0x2c], 0
je 0x41d899
cmp edi, 0x5e96c0
je 0x41d66e
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
xor al, al
jmp 0x41d8ac
cmp edi, 0x5e96c0
je 0x41d8aa
push edi
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