Function at 0x417b40
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4392c8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44e040]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x34]
xor edi, edi
cmp ebx, edi
jne 0x417bb5
mov edi, dword [esp + 0x30]
cmp byte [edi + 0x2c], 0
jne 0x417bae
mov byte [edi + 0x2c], 1
mov dword [edi + 0x30], 2
mov edx, dword [str.Failed_to_open_file]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x417b91
sub eax, esi
push edx
lea esi, [edi + 0x34]
mov ecx, eax
call fcn.004169d0
or eax, 0xffffffff
mov dword [edi + 0x40], eax
mov dword [edi + 0x3c], eax
xor al, al
jmp 0x417e4b
mov ebp, dword [esp + 0x30]
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x417bd1
mov ecx, esi
mov eax, dword [ecx]
mov edx, dword [eax]
mov esi, dword [esi + 0x28]
push 1
call edx
cmp esi, edi
jne 0x417bc0
push 2
or eax, 0xffffffff
mov dword [ebp + 0x18], edi
mov dword [ebp + 0x1c], edi
push edi
push ebx
mov dword [ebp + 8], eax
mov dword [ebp + 4], eax
call fcn.0042324d
push ebx
call fcn.00423155
push 0
mov edi, eax
push 0
push ebx
mov dword [esp + 0x38], edi
call fcn.0042324d
add esp, 0x1c
test edi, edi
jg 0x417c46
cmp byte [ebp + 0x2c], 0
jne 0x417c3f
mov byte [ebp + 0x2c], 1
mov dword [ebp + 0x30], 0xc
mov edx, dword [str.Error_document_empty.]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x417c22
sub eax, esi
push edx
lea esi, [ebp + 0x34]
mov ecx, eax
call fcn.004169d0
or eax, 0xffffffff
mov dword [ebp + 0x40], eax
mov dword [ebp + 0x3c], eax
xor al, al
jmp 0x417e4b
mov dword [esp + 0x14], 0x451240
inc edi
mov ecx, edi
lea esi, [esp + 0x14]
mov dword [esp + 0x28], 0
call fcn.00416940
push edi
call fcn.00421ae3
push edi
mov ebx, eax
push 0
push ebx
mov dword [esp + 0x28], ebx
call fcn.00425110
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x2c]
push eax
push 1
push ecx
push ebx
call fcn.00422e7f
add esp, 0x20
cmp eax, 1
je 0x417cee
push ebx
call fcn.00421709
add esp, 4
cmp byte [ebp + 0x2c], 0
jne 0x417cd3
mov byte [ebp + 0x2c], 1
mov dword [ebp + 0x30], 2
mov edx, dword [str.Failed_to_open_file]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x417cb6
sub eax, esi
push edx
lea esi, [ebp + 0x34]
mov ecx, eax
call fcn.004169d0
or eax, 0xffffffff
mov dword [ebp + 0x40], eax
mov dword [ebp + 0x3c], eax
mov eax, dword [esp + 0x14]
cmp eax, 0x451240
je 0x417ce7
push eax
call fcn.00421709
add esp, 4
xor al, al
jmp 0x417e4b
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
mov eax, ebx
mov byte [ebx + edx], 0
cmp byte [ebx], 0
mov dword [esp + 0x34], eax
mov edi, ebx
je 0x417de3
jmp 0x417d10
mov cl, byte [edi]
cmp cl, 0xa
jne 0x417d64
mov ebx, dword [esi]
mov ebp, edi
sub ebp, eax
inc ebp
add ebx, ebp
cmp ebx, dword [esi + 4]
jbe 0x417d3b
mov ecx, dword [esi + 4]
add ecx, ebx
lea esi, [esp + 0x14]
call fcn.00416940
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x34]
push ebp
push eax
mov eax, dword [esi]
lea ecx, [eax + esi + 8]
push ecx
call fcn.004224b0
mov ebp, dword [esp + 0x3c]
add esp, 0xc
mov dword [esi], ebx
inc edi
mov byte [ebx + esi + 8], 0
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x34], edi
mov eax, edi
jmp 0x417dda
cmp cl, 0xd
jne 0x417dd9
mov ebx, edi
sub ebx, eax
test ebx, ebx
jle 0x417d7f
push eax
lea eax, [esp + 0x18]
call fcn.00416a80
mov esi, dword [esp + 0x14]
mov byte [esp + 0x34], 0xa
mov ebx, dword [esi]
inc ebx
cmp ebx, dword [esi + 4]
jbe 0x417d9e
mov ecx, dword [esi + 4]
add ecx, ebx
lea esi, [esp + 0x14]
call fcn.00416940
mov esi, dword [esp + 0x14]
mov eax, dword [esi]
push 1
lea edx, [esp + 0x38]
push edx
lea ecx, [eax + esi + 8]
push ecx
call fcn.004224b0
mov dword [esi], ebx
mov byte [ebx + esi + 8], 0
mov ebx, dword [esp + 0x24]
add esp, 0xc
cmp byte [edi + 1], 0xa
jne 0x417dd0
add edi, 2
mov dword [esp + 0x34], edi
mov eax, edi
jmp 0x417dda
inc edi
mov dword [esp + 0x34], edi
mov eax, edi
jmp 0x417dda
inc edi
cmp byte [edi], 0
jne 0x417d10
sub edi, eax
je 0x417dfb
push eax
mov ebx, edi
lea eax, [esp + 0x18]
call fcn.00416a80
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
push ebx
call fcn.00421709
mov eax, dword [esp + 0x3c]
mov edx, dword [ebp]
mov edx, dword [edx + 8]
add esp, 4
push eax
push 0
lea ecx, [esi + 8]
push ecx
mov ecx, ebp
call edx
cmp byte [ebp + 0x2c], 0
je 0x417e38
cmp esi, 0x451240
je 0x417ce7
push esi
call fcn.00421709
add esp, 4
xor al, al
jmp 0x417e4b
cmp esi, 0x451240
je 0x417e49
push esi
call fcn.00421709
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 0xc