Function at 0x10017bc5
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1024]
mov eax, 0x1024
call fcn.10076990
push 0xffffffffffffffff
push 0x10084566
mov eax, dword fs:[0]
push eax
sub esp, 0x134
mov eax, dword [0x100a52b4]
xor eax, ebp
mov dword [ebp + 0x1020], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x102c]
push 0x1008ad00
push eax
mov esi, ecx
mov dword [ebp - 0x20], eax
call fcn.1000164e
push 0x1009045c
lea ecx, [ebp]
call fcn.100100ef
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [esi + 0x14], ebx
jne 0x10017c65
xor esi, esi
inc esi
push ebx
push 1
lea ecx, [ebp]
call fcn.100118ae
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1020]
xor ecx, ebp
call fcn.10069957
add ebp, 0x1024
leave
ret
xor eax, eax
inc eax
cmp dword [esi + 0x18], 8
mov dword [ebp - 0x10], eax
jb 0x10017c76
mov esi, dword [esi + 4]
jmp 0x10017c79
add esi, 4
push ebx
push 0x20
push 3
push ebx
push eax
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x18], esi
cmp esi, 0xffffffff
jne 0x10017c9b
push 2
pop esi
jmp 0x10017c35
xor eax, eax
cmp dword [ebp + 0x1030], 1
lea edi, [ebp - 0x13]
mov byte [ebp - 0x14], bl
stosw word es:[edi], ax
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x1c], ebx
jne 0x10017cfc
push ebx
lea eax, [ebp - 0x10]
push eax
push 3
lea eax, [ebp - 0x14]
push eax
push esi
call edi
test eax, eax
jne 0x10017cd4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 3
jmp 0x10017c98
cmp byte [ebp - 0x14], 0xef
jne 0x10017cf2
cmp byte [ebp - 0x13], 0xbb
jne 0x10017cf2
cmp byte [ebp - 0x12], 0xbf
jne 0x10017cf2
mov dword [ebp + 0x1030], 2
jmp 0x10017cfc
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x10], ebx
je 0x10017d58
mov esi, 0x1000
push 0x1001
lea eax, [ebp + 0x1c]
push ebx
push eax
mov dword [ebp - 0x10], ebx
call fcn.1006c610
add esp, 0xc
push ebx
lea eax, [ebp - 0x10]
push eax
push esi
lea eax, [ebp + 0x1c]
push eax
push dword [ebp - 0x18]
call edi
test eax, eax
je 0x10017d51
cmp dword [ebp - 0x10], esi
jbe 0x10017d36
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp - 0x10]
mov byte [ebp + eax + 0x1c], bl
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp]
push eax
call fcn.10014373
cmp dword [ebp - 0x10], ebx
jne 0x10017d06
jmp 0x10017d58
mov dword [ebp - 0x1c], 4
mov eax, dword [ebp + 0x1030]
dec eax
je 0x10017da6
dec eax
je 0x10017d74
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 5
jmp 0x10017c98
cmp dword [ebp + 0x18], 0x10
mov ecx, dword [ebp + 4]
jae 0x10017d80
lea ecx, [ebp + 4]
lea eax, [ebp - 0x3c]
push eax
call fcn.10018c13
pop ecx
mov ecx, dword [ebp - 0x20]
push 0xffffffffffffffff
push ebx
mov byte [ebp - 4], 1
call fcn.10001810
push ebx
push 1
lea esi, [ebp - 0x3c]
call fcn.10001673
jmp 0x10017df9
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x10017db2
lea eax, [ebp + 4]
push 3
push eax
lea eax, [ebp - 0x140]
lea ecx, [ebp - 0x13c]
push eax
mov dword [ebp - 0x140], ecx
call fcn.100176a2
mov byte [ebp - 4], 2
push dword [ebp - 0x140]
push dword [ebp - 0x20]
call fcn.1000164e
lea eax, [ebp - 0x13c]
cmp dword [ebp - 0x140], eax
je 0x10017df9
push dword [ebp - 0x140]
call fcn.10069966
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x10017e0d
push 6
jmp 0x10017c98
mov esi, dword [ebp - 0x1c]
jmp 0x10017c35