Function at 0x417570
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x452628
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x469424]
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 0x4175e6
mov ebp, dword [esp + 0x30]
cmp byte [ebp + 0x2c], 0
jne 0x4175df
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 0x4175c1
sub eax, edx
lea edi, [ebp + 0x34]
mov esi, eax
call fcn.00416370
or eax, 0xffffffff
mov dword [ebp + 0x40], eax
mov dword [ebp + 0x3c], eax
xor al, al
jmp 0x41788e
mov ebx, dword [esp + 0x30]
mov esi, dword [ebx + 0x18]
cmp esi, edi
je 0x417602
mov ecx, esi
mov eax, dword [ecx]
mov edx, dword [eax]
mov esi, dword [esi + 0x28]
push 1
call edx
cmp esi, edi
jne 0x4175f1
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.0043b64f
push ebp
call fcn.0043b55a
push edi
push edi
push ebp
mov esi, eax
call fcn.0043b64f
add esp, 0x1c
cmp esi, edi
jg 0x41767b
cmp byte [ebx + 0x2c], 0
jne 0x417674
mov byte [ebx + 0x2c], 1
mov dword [ebx + 0x30], 0xc
mov edx, dword [str.Error_document_empty.]
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x417650
sub eax, esi
lea edi, [ebx + 0x34]
mov esi, eax
mov ebx, edx
call fcn.00416370
mov eax, dword [esp + 0x30]
or ecx, 0xffffffff
mov dword [eax + 0x40], ecx
mov dword [eax + 0x3c], ecx
xor al, al
jmp 0x41788e
mov dword [esp + 0x14], 0x46e240
lea eax, [esp + 0x14]
mov dword [esp + 0x28], edi
push eax
mov edi, esi
call fcn.004162b0
lea ecx, [esi + 1]
push ecx
call fcn.0041eda3
push ebp
mov edi, eax
push 1
push esi
push edi
mov dword [esp + 0x2c], edi
mov byte [edi], 0
call fcn.0043b19b
add esp, 0x14
cmp eax, 1
je 0x41771f
push edi
call fcn.0041edce
add esp, 4
cmp byte [ebx + 0x2c], 0
jne 0x417704
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 esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4176e0
sub eax, esi
lea edi, [ebx + 0x34]
mov esi, eax
mov ebx, edx
call fcn.00416370
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, 0x46e240
je 0x417718
push eax
call fcn.0041edce
add esp, 4
xor al, al
jmp 0x41788e
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 0x41782b
mov al, byte [ebp]
cmp al, 0xa
jne 0x41779c
mov ebx, dword [esi]
mov eax, ebp
sub eax, ecx
add eax, 1
add ebx, eax
cmp ebx, dword [esi + 4]
mov dword [esp + 0x1c], eax
jbe 0x417772
mov edi, dword [esi + 4]
lea edx, [esp + 0x14]
add edi, ebx
push edx
call fcn.004162b0
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [esi]
push ecx
lea ecx, [eax + esi + 8]
push ecx
call fcn.0043bac0
add esp, 0xc
mov dword [esi], ebx
add ebp, 1
mov byte [ebx + esi + 8], 0
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x34], ebp
mov ecx, ebp
jmp 0x417821
cmp al, 0xd
jne 0x41781e
mov eax, ebp
sub eax, ecx
test eax, eax
jle 0x4177bb
push eax
push ecx
lea ebx, [esp + 0x1c]
call fcn.00416450
mov esi, dword [esp + 0x14]
mov byte [esp + 0x34], 0xa
mov ebx, dword [esi]
add ebx, 1
cmp ebx, dword [esi + 4]
jbe 0x4177e1
mov edi, dword [esi + 4]
lea edx, [esp + 0x14]
add edi, ebx
push edx
call fcn.004162b0
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.0043bac0
mov dword [esi], ebx
mov byte [ebx + esi + 8], 0
mov ebx, dword [esp + 0x3c]
add esp, 0xc
cmp byte [ebp + 1], 0xa
jne 0x417813
add ebp, 2
mov dword [esp + 0x34], ebp
mov ecx, ebp
jmp 0x417821
add ebp, 1
mov dword [esp + 0x34], ebp
mov ecx, ebp
jmp 0x417821
add ebp, 1
cmp byte [ebp], 0
jne 0x417738
sub ebp, ecx
je 0x417842
push ebp
push ecx
lea ebx, [esp + 0x1c]
call fcn.00416450
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x30]
push edi
call fcn.0041edce
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 0x41787b
cmp esi, 0x46e240
je 0x417718
push esi
call fcn.0041edce
add esp, 4
xor al, al
jmp 0x41788e
cmp esi, 0x46e240
je 0x41788c
push esi
call fcn.0041edce
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