Function at 0x46fc70
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x49c348
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x4c02a0]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4c02a0]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x44]
mov esi, ecx
test esi, esi
jne 0x46fcea
cmp byte [ebp + 0x44], cl
jne 0x46fce3
mov byte [ebp + 0x44], 1
mov dword [ebp + 0x48], 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 0x46fcc7
sub eax, esi
push eax
push edx
lea ecx, [ebp + 0x4c]
call fcn.004017c0
or eax, 0xffffffff
mov dword [ebp + 0x70], eax
mov dword [ebp + 0x6c], eax
xor al, al
jmp 0x46fed7
mov edi, ebp
call fcn.0046efd0
push 2
or ebx, 0xffffffff
push 0
push esi
mov dword [ebp + 8], ebx
mov dword [ebp + 4], ebx
call fcn.004807c9
push esi
call fcn.0048158d
push 0
push 0
push esi
mov edi, eax
call fcn.004807c9
xor eax, eax
add esp, 0x1c
cmp edi, eax
jg 0x46fd60
cmp byte [ebp + 0x44], al
jne 0x46fd59
mov byte [ebp + 0x44], 1
mov dword [ebp + 0x48], 0xd
mov edx, dword [str.Error_document_empty.]
mov eax, edx
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x46fd40
sub eax, esi
push eax
push edx
lea ecx, [ebp + 0x4c]
call fcn.004017c0
mov dword [ebp + 0x70], ebx
mov dword [ebp + 0x6c], ebx
xor al, al
jmp 0x46fed7
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], eax
mov byte [esp + 0x18], al
mov dword [esp + 0x3c], eax
cmp edi, 0xf
je 0x46fda3
push 1
push edi
lea ecx, [esp + 0x1c]
call fcn.00401b90
test al, al
je 0x46fda3
cmp dword [esp + 0x2c], 0x10
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], 0
jae 0x46fda0
lea eax, [esp + 0x18]
mov byte [eax], 0
lea eax, [edi + 1]
push eax
call fcn.0047c76b
push esi
push 1
mov ebx, eax
push edi
push ebx
mov byte [ebx], 0
call fcn.0048062f
add esp, 0x14
cmp eax, 1
je 0x46fe1f
push ebx
call fcn.0047d358
add esp, 4
cmp byte [ebp + 0x44], 0
jne 0x46fe04
mov byte [ebp + 0x44], 1
mov dword [ebp + 0x48], 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 0x46fde8
sub eax, esi
push eax
push edx
lea ecx, [ebp + 0x4c]
call fcn.004017c0
or eax, 0xffffffff
mov dword [ebp + 0x70], eax
mov dword [ebp + 0x6c], eax
cmp dword [esp + 0x2c], 0x10
jb 0x46fe18
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0047ceda
add esp, 4
xor al, al
jmp 0x46fed7
mov byte [ebx + edi], 0
cmp byte [ebx], 0
mov eax, ebx
mov esi, ebx
je 0x46fe87
lea esp, [esp]
mov cl, byte [esi]
cmp cl, 0xa
jne 0x46fe4c
mov edx, esi
sub edx, eax
inc edx
push edx
push eax
lea eax, [esp + 0x1c]
call fcn.0041e7c0
inc esi
mov eax, esi
jmp 0x46fe82
cmp cl, 0xd
jne 0x46fe81
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x46fe64
push ecx
push eax
lea eax, [esp + 0x1c]
call fcn.0041e7c0
push 0xa
mov eax, 1
lea edi, [esp + 0x18]
call fcn.00471030
cmp byte [esi + 1], 0xa
jne 0x46fe47
add esi, 2
mov eax, esi
jmp 0x46fe82
inc esi
cmp byte [esi], 0
jne 0x46fe30
sub esi, eax
je 0x46fe96
push esi
push eax
lea eax, [esp + 0x1c]
call fcn.0041e7c0
push ebx
call fcn.0047d358
mov eax, dword [esp + 0x1c]
add esp, 4
cmp dword [esp + 0x2c], 0x10
jae 0x46feae
lea eax, [esp + 0x18]
mov edx, dword [ebp]
push 0
push 0
push eax
mov eax, dword [edx + 8]
mov ecx, ebp
call eax
cmp byte [ebp + 0x44], 0
lea ecx, [esp + 0x14]
je 0x46fed0
call fcn.00401d30
xor al, al
jmp 0x46fed7
call fcn.00401d30
mov al, 1
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0047cee5
add esp, 0x2c
ret 4