Function at 0x46c150
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x66037d
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x7000a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x14]
push eax
mov dword [ebp - 0x14], 0
call fcn.0045ddd0
mov dword [ebp - 4], 0
lea ecx, [ebx + 0x20]
mov esi, dword [ebp - 0x14]
push dword [esi]
lea eax, [esi + 8]
push eax
call fcn.0046b1d0
mov eax, dword [ebx + 0x20]
add eax, 8
mov dword [ebp - 0x18], 0
push 0x6f8020
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004c54c4
add esp, 0xc
test eax, eax
jne 0x46c341
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x46c341
mov edi, dword [ebx + 0x18]
test edi, edi
je 0x46c1f6
mov ecx, edi
mov edi, dword [edi + 0x28]
push 1
mov eax, dword [ecx]
call dword [eax]
test edi, edi
jne 0x46c1e4
mov eax, dword [ebp - 0x1c]
push 2
push 0
push eax
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 8], 0xffffffff
mov dword [ebx + 4], 0xffffffff
call fcn.004c58dd
push dword [ebp - 0x1c]
call fcn.004c5f7b
push 0
push 0
push dword [ebp - 0x1c]
mov edi, eax
mov dword [ebp - 0x20], edi
call fcn.004c58dd
add esp, 0x1c
test edi, edi
jg 0x46c28b
cmp byte [ebx + 0x2c], 0
jne 0x46c279
mov edx, dword [str.Error_document_empty.]
mov ecx, edx
mov byte [ebx + 0x2c], 1
mov dword [ebx + 0x30], 0xc
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46c258
sub ecx, edi
push ecx
push edx
lea ecx, [ebx + 0x34]
call fcn.0046b1d0
mov dword [ebx + 0x40], 0xffffffff
mov dword [ebx + 0x3c], 0xffffffff
push dword [ebp - 0x1c]
xor bl, bl
call fcn.004c5582
add esp, 4
jmp 0x46c383
lea eax, [edi + 1]
push eax
call fcn.004b7b54
push dword [ebp - 0x1c]
mov edi, eax
push 1
push dword [ebp - 0x20]
push edi
mov byte [edi], 0
call fcn.004c616c
add esp, 0x14
cmp eax, 1
je 0x46c2dd
push edi
call fcn.004b7b4f
add esp, 4
cmp byte [ebx + 0x2c], 0
jne 0x46c279
mov edx, dword [str.Failed_to_open_file]
mov ecx, edx
mov byte [ebx + 0x2c], 1
mov dword [ebx + 0x30], 2
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46c2d4
jmp 0x46c25f
mov edx, dword [ebp - 0x20]
mov eax, edi
mov ecx, edi
mov byte [edi + edx], 0
mov dl, byte [edi]
test dl, dl
je 0x46c315
nop
inc eax
lea esi, [ecx + 1]
mov dword [ebp - 0x20], esi
cmp dl, 0xd
jne 0x46c307
mov byte [ecx], 0xa
cmp byte [eax], 0xa
jne 0x46c309
inc eax
jmp 0x46c309
mov byte [ecx], dl
mov dl, byte [eax]
mov ecx, dword [ebp - 0x20]
test dl, dl
jne 0x46c2f0
mov esi, dword [ebp - 0x14]
mov byte [ecx], 0
mov ecx, ebx
mov eax, dword [ebx]
push 0
push 0
push edi
call dword [eax + 8]
push edi
call fcn.004b7b4f
add esp, 4
cmp byte [ebx + 0x2c], 0
sete bl
push dword [ebp - 0x1c]
call fcn.004c5582
add esp, 4
jmp 0x46c383
cmp byte [ebx + 0x2c], 0
jne 0x46c381
mov edx, dword [str.Failed_to_open_file]
mov ecx, edx
mov byte [ebx + 0x2c], 1
mov dword [ebx + 0x30], 2
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46c360
sub ecx, edi
push ecx
push edx
lea ecx, [ebx + 0x34]
call fcn.0046b1d0
mov dword [ebx + 0x40], 0xffffffff
mov dword [ebx + 0x3c], 0xffffffff
xor bl, bl
cmp esi, 0x709a1c
je 0x46c394
push esi
call fcn.004b7b4f
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b75b2
mov esp, ebp
pop ebp
ret 8