Function at 0x413470
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x452608
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x468400]
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 0x4134e4
mov ebp, dword [esp + 0x30]
cmp byte [ebp + 0x2c], 0
jne 0x4134dd
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 0x4134c1
sub eax, edx
lea edi, [ebp + 0x34]
mov esi, eax
call fcn.00412080
or eax, 0xffffffff
mov dword [ebp + 0x40], eax
mov dword [ebp + 0x3c], eax
xor al, al
jmp 0x41377b
mov ebx, dword [esp + 0x30]
mov esi, dword [ebx + 0x18]
cmp esi, edi
je 0x413501
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 0x4134f0
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.00437470
push ebp
call fcn.00437378
push edi
push edi
push ebp
mov esi, eax
call fcn.00437470
add esp, 0x1c
cmp esi, edi
jne 0x413579
cmp byte [ebx + 0x2c], 0
jne 0x413572
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 0x413550
sub eax, esi
lea edi, [ebx + 0x34]
mov esi, eax
mov ebx, edx
call fcn.00412080
mov eax, dword [esp + 0x30]
or ecx, 0xffffffff
mov dword [eax + 0x40], ecx
mov dword [eax + 0x3c], ecx
xor al, al
jmp 0x41377b
mov dword [esp + 0x14], 0x46c740
lea eax, [esp + 0x14]
mov dword [esp + 0x28], edi
push eax
mov edi, esi
call fcn.00411fc0
lea ecx, [esi + 1]
push ecx
call fcn.004199d8
push ebp
mov edi, eax
push 1
push esi
push edi
mov dword [esp + 0x2c], edi
mov byte [edi], 0
call fcn.00437141
add esp, 0x14
cmp eax, 1
je 0x41361d
push edi
call fcn.00419a12
add esp, 4
cmp byte [ebx + 0x2c], 0
jne 0x413602
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 0x4135e0
sub eax, esi
lea edi, [ebx + 0x34]
mov esi, eax
mov ebx, edx
call fcn.00412080
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, 0x46c740
je 0x413616
push eax
call fcn.00419a12
add esp, 4
xor al, al
jmp 0x41377b
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 0x413718
mov al, byte [ebp]
cmp al, 0xa
jne 0x413693
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 0x41366e
mov edi, dword [esi + 4]
lea edx, [esp + 0x14]
add edi, ebx
push edx
call fcn.00411fc0
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.00438f80
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 0x41370e
cmp al, 0xd
jne 0x41370d
mov eax, ebp
sub eax, ecx
test eax, eax
jle 0x4136ae
push eax
push ecx
lea ebx, [esp + 0x1c]
call fcn.00412160
mov esi, dword [esp + 0x14]
mov byte [esp + 0x34], 0xa
mov ebx, dword [esi]
inc ebx
cmp ebx, dword [esi + 4]
jbe 0x4136d2
mov edi, dword [esi + 4]
lea edx, [esp + 0x14]
add edi, ebx
push edx
call fcn.00411fc0
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.00438f80
mov dword [esi], ebx
mov byte [ebx + esi + 8], 0
mov ebx, dword [esp + 0x3c]
add esp, 0xc
cmp byte [ebp + 1], 0xa
jne 0x413704
add ebp, 2
mov dword [esp + 0x34], ebp
mov ecx, ebp
jmp 0x41370e
inc ebp
mov dword [esp + 0x34], ebp
mov ecx, ebp
jmp 0x41370e
inc ebp
cmp byte [ebp], 0
jne 0x413636
sub ebp, ecx
je 0x41372f
push ebp
push ecx
lea ebx, [esp + 0x1c]
call fcn.00412160
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x30]
push edi
call fcn.00419a12
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 0x413768
cmp esi, 0x46c740
je 0x413616
push esi
call fcn.00419a12
add esp, 4
xor al, al
jmp 0x41377b
cmp esi, 0x46c740
je 0x413779
push esi
call fcn.00419a12
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