Function at 0x10176c90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101d1a38
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x1022c068]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [0x10235278]
mov ebx, dword [0x1023527c]
mov dword [ebp - 0x24], ebx
test esi, esi
jne 0x10176cf9
cmp byte [ebx + 0x2c], 0
jne 0x10176d71
mov edx, dword [str.Failed_to_open_file]
mov ecx, edx
mov byte [ebx + 0x2c], 1
mov dword [ebx + 0x30], 2
lea esi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10176cf0
jmp 0x10176d57
mov ecx, ebx
call fcn.10176270
push 2
push 0
push esi
mov dword [ebx + 8], 0xffffffff
mov dword [ebx + 4], 0xffffffff
call fcn.1018b8c7
push esi
call fcn.1018b48f
push 0
mov edi, eax
push 0
push esi
mov dword [ebp - 0x20], edi
call fcn.1018b8c7
add esp, 0x1c
test edi, edi
jg 0x10176d87
cmp byte [ebx + 0x2c], 0
jne 0x10176d71
mov edx, dword [str.Error_document_empty.]
mov ecx, edx
mov byte [ebx + 0x2c], 1
mov dword [ebx + 0x30], 0xd
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10176d50
sub ecx, esi
push ecx
push edx
lea ecx, [ebx + 0x34]
call fcn.10178010
mov dword [ebx + 0x3c], 0xffffffff
mov dword [ebx + 0x40], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lfence
mov dword [ebp - 0x14], 0x102347e4
push edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0
call fcn.10177f50
lea eax, [edi + 1]
push eax
call fcn.10186d6b
push esi
push 1
mov esi, eax
mov dword [ebp - 0x1c], eax
push edi
push esi
mov byte [eax], 0
call fcn.1018f461
add esp, 0x14
lfence
cmp eax, 1
je 0x10176e1b
push esi
call fcn.10186693
add esp, 4
cmp byte [ebx + 0x2c], 0
jne 0x10176e11
mov edx, dword [str.Failed_to_open_file]
mov ecx, edx
mov byte [ebx + 0x2c], 1
mov dword [ebx + 0x30], 2
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10176df0
sub ecx, esi
push ecx
push edx
lea ecx, [ebx + 0x34]
call fcn.10178010
mov dword [ebx + 0x40], 0xffffffff
mov dword [ebx + 0x3c], 0xffffffff
mov esi, dword [ebp - 0x14]
xor bl, bl
jmp 0x10176f9d
mov eax, dword [ebp - 0x20]
mov ecx, esi
mov edi, esi
mov dword [ebp - 0x18], ecx
mov byte [esi + eax], 0
mov al, byte [esi]
mov esi, dword [ebp - 0x14]
test al, al
je 0x10176f26
cmp al, 0xa
jne 0x10176e89
mov ebx, dword [esi]
mov eax, edi
sub eax, ecx
inc eax
add ebx, eax
mov dword [ebp - 0x20], eax
cmp ebx, dword [esi + 4]
jbe 0x10176e65
lfence
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x14]
add eax, ebx
push eax
call fcn.10177f50
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
push eax
mov eax, dword [esi]
add eax, 8
push ecx
add eax, esi
push eax
call fcn.10187ee0
add esp, 0xc
mov dword [esi], ebx
inc edi
mov byte [ebx + esi + 8], 0
mov ecx, edi
mov dword [ebp - 0x18], ecx
jmp 0x10176f19
cmp al, 0xd
jne 0x10176f18
mov ebx, edi
sub ebx, ecx
test ebx, ebx
jle 0x10176ed7
mov ecx, dword [esi]
add ecx, ebx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [esi + 4]
jbe 0x10176eb9
lfence
mov eax, dword [esi + 4]
add eax, ecx
lea ecx, [ebp - 0x14]
push eax
call fcn.10177f50
mov esi, dword [ebp - 0x14]
mov eax, dword [esi]
push ebx
push dword [ebp - 0x18]
add eax, 8
add eax, esi
push eax
call fcn.10187ee0
mov eax, dword [ebp - 0x20]
add esp, 0xc
mov dword [esi], eax
mov byte [eax + esi + 8], 0
mov ebx, dword [esi]
inc ebx
mov byte [ebp - 0x10], 0xa
cmp ebx, dword [esi + 4]
jbe 0x10176ef7
lfence
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x14]
add eax, ebx
push eax
call fcn.10177f50
mov esi, dword [ebp - 0x14]
mov eax, dword [esi]
mov byte [eax + esi + 8], 0xa
xor eax, eax
mov dword [esi], ebx
mov byte [ebx + esi + 8], 0
cmp byte [edi + 1], 0xa
sete al
inc eax
add edi, eax
mov ecx, edi
mov dword [ebp - 0x18], ecx
jmp 0x10176f19
inc edi
mov al, byte [edi]
test al, al
jne 0x10176e36
mov ebx, dword [ebp - 0x24]
sub edi, ecx
je 0x10176f6c
lfence
mov edx, dword [esi]
add edx, edi
mov dword [ebp - 0x24], edx
cmp edx, dword [esi + 4]
jbe 0x10176f50
lfence
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x14]
add eax, edx
push eax
call fcn.10177f50
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
mov eax, dword [esi]
push edi
add eax, 8
push ecx
add eax, esi
push eax
call fcn.10187ee0
mov eax, dword [ebp - 0x24]
add esp, 0xc
mov dword [esi], eax
mov byte [eax + esi + 8], 0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.10186693
mov ecx, dword [ebx]
lea eax, [esi + 8]
add esp, 4
mov edi, dword [ecx + 8]
mov ecx, edi
push 0
push 0
push eax
call dword [0x101d3368]
mov ecx, ebx
call edi
cmp byte [ebx + 0x2c], 0
je 0x10176f9b
xor bl, bl
jmp 0x10176f9d
mov bl, 1
cmp esi, 0x102347e4
je 0x10176fae
push esi
call fcn.10186693
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 esp, ebp
pop ebp
ret 8