Function at 0x416700
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4653e8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x482ad0]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x34]
xor edi, edi
cmp ebp, edi
jne 0x416774
mov ebp, dword [esp + 0x30]
cmp byte [ebp + 0x2c], 0
jne 0x41676d
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]
inc eax
test cl, cl
jne 0x416751
sub eax, edx
lea edi, [ebp + 0x34]
mov esi, eax
call fcn.00417450
or eax, 0xffffffff
mov dword [ebp + 0x40], eax
mov dword [ebp + 0x3c], eax
xor al, al
jmp 0x416a0b
mov ebx, dword [esp + 0x30]
mov esi, dword [ebx + 0x18]
cmp esi, edi
je 0x416791
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 0x416780
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 fcn.0044c54e
push ebp
call fcn.0044c456
push edi
push edi
push ebp
mov esi, eax
call fcn.0044c54e
add esp, 0x1c
cmp esi, edi
jg 0x416809
cmp byte [ebx + 0x2c], 0
jne 0x416802
mov byte [ebx + 0x2c], 1
mov dword [ebx + 0x30], 0xd
mov edx, dword [str.Error_document_empty.]
mov eax, edx
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4167e0
sub eax, esi
lea edi, [ebx + 0x34]
mov esi, eax
mov ebx, edx
call fcn.00417450
mov eax, dword [esp + 0x30]
or ecx, 0xffffffff
mov dword [eax + 0x40], ecx
mov dword [eax + 0x3c], ecx
xor al, al
jmp 0x416a0b
mov dword [esp + 0x14], 0x4870f0
lea eax, [esp + 0x14]
mov dword [esp + 0x28], edi
push eax
mov edi, esi
call fcn.00417390
lea ecx, [esi + 1]
push ecx
call fcn.00419661
push ebp
mov edi, eax
push 1
push esi
push edi
mov dword [esp + 0x2c], edi
mov byte [edi], 0
call fcn.0044c0ee
add esp, 0x14
cmp eax, 1
je 0x4168ad
push edi
call fcn.00419690
add esp, 4
cmp byte [ebx + 0x2c], 0
jne 0x416892
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]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x416870
sub eax, esi
lea edi, [ebx + 0x34]
mov esi, eax
mov ebx, edx
call fcn.00417450
mov eax, dword [esp + 0x30]
or ecx, 0xffffffff
mov dword [eax + 0x40], ecx
mov dword [eax + 0x3c], ecx
mov eax, dword [esp + 0x14]
cmp eax, 0x4870f0
je 0x4168a6
push eax
call fcn.00419690
add esp, 4
xor al, al
jmp 0x416a0b
mov byte [edi + esi], 0
cmp byte [edi], 0
mov esi, dword [esp + 0x14]
mov ecx, edi
mov dword [esp + 0x34], ecx
mov ebp, edi
je 0x4169a8
mov al, byte [ebp]
cmp al, 0xa
jne 0x416923
mov ebx, dword [esi]
mov eax, ebp
sub eax, ecx
inc eax
add ebx, eax
mov dword [esp + 0x1c], eax
cmp ebx, dword [esi + 4]
jbe 0x4168fe
mov edi, dword [esi + 4]
lea edx, [esp + 0x14]
add edi, ebx
push edx
call fcn.00417390
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
push eax
mov eax, dword [esi]
push ecx
lea ecx, [eax + esi + 8]
push ecx
call fcn.0044c6d0
add esp, 0xc
mov dword [esi], ebx
inc ebp
mov byte [ebx + esi + 8], 0
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x34], ebp
mov ecx, ebp
jmp 0x41699e
cmp al, 0xd
jne 0x41699d
mov eax, ebp
sub eax, ecx
test eax, eax
jle 0x41693e
push eax
push ecx
lea ebx, [esp + 0x1c]
call fcn.00417530
mov esi, dword [esp + 0x14]
mov byte [esp + 0x34], 0xa
mov ebx, dword [esi]
inc ebx
cmp ebx, dword [esi + 4]
jbe 0x416962
mov edi, dword [esi + 4]
lea edx, [esp + 0x14]
add edi, ebx
push edx
call fcn.00417390
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ecx, dword [esi]
push 1
lea eax, [esp + 0x38]
push eax
lea edx, [ecx + esi + 8]
push edx
call fcn.0044c6d0
mov dword [esi], ebx
mov byte [ebx + esi + 8], 0
mov ebx, dword [esp + 0x3c]
add esp, 0xc
cmp byte [ebp + 1], 0xa
jne 0x416994
add ebp, 2
mov dword [esp + 0x34], ebp
mov ecx, ebp
jmp 0x41699e
inc ebp
mov dword [esp + 0x34], ebp
mov ecx, ebp
jmp 0x41699e
inc ebp
cmp byte [ebp], 0
jne 0x4168c6
sub ebp, ecx
je 0x4169bf
push ebp
push ecx
lea ebx, [esp + 0x1c]
call fcn.00417530
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x30]
push edi
call fcn.00419690
mov eax, dword [ebx]
mov edx, dword [eax + 8]
add esp, 4
push 0
push 0
lea ecx, [esi + 8]
push ecx
mov ecx, ebx
call edx
cmp byte [ebx + 0x2c], 0
je 0x4169f8
cmp esi, 0x4870f0
je 0x4168a6
push esi
call fcn.00419690
add esp, 4
xor al, al
jmp 0x416a0b
cmp esi, 0x4870f0
je 0x416a09
push esi
call fcn.00419690
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