Function at 0x10017f9d
Capabilities:
Read file on windows

Disassembly:
push 0xb4
mov eax, 0x10030aaa
call fcn.1001b77a
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x80], ebx
test byte [0x10040a3c], 1
mov dword [ebp - 0x7c], eax
jne 0x10017fe4
or dword [0x10040a3c], 1
mov dword [ebp - 4], ebx
call fcn.10018eb1
push 0x10032a4c
call fcn.1001ae76
or dword [ebp - 4], 0xffffffff
pop ecx
mov esi, 0x10040a24
cmp byte [0x1003f212], bl
je 0x10017ffe
push esi
mov byte [0x1003f212], bl
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 8
pop ecx
xor eax, eax
mov dword [ebp - 0xb0], ebx
lea edi, [ebp - 0xac]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xb0]
push eax
push ebx
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
cmp dword [ebp - 0xb0], 0xffffffff
je 0x1001825a
test byte [ebp - 0xb0], 0x10
jne 0x1001825a
cmp dword [ebp - 0x94], ebx
ja 0x1001825a
cmp dword [ebp - 0x90], 0xa00000
ja 0x1001825a
mov eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x2c]
call fcn.100057f0
lea eax, [ebp - 0x8c]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 1
call fcn.10018d7b
mov edi, eax
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x2c]
call fcn.10018d9b
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0xc0]
lea ecx, [ebp - 0x2c]
call fcn.10018d7b
push dword [edi + 4]
mov ecx, dword [ebp - 0x80]
push dword [edi]
push dword [ecx + 4]
push dword [ecx]
push dword [eax + 4]
push dword [eax]
lea eax, [ebp - 0x84]
push eax
call fcn.10019ca6
add esp, 0x1c
push esi
mov dword [ebp - 0xb4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x8c]
push eax
mov byte [ebp - 4], 2
call fcn.10019006
mov eax, dword [0x10040a1c]
mov dword [ebp - 0x80], eax
mov eax, dword [0x10040a04]
lea edi, [ebp - 0x84]
lea esi, [ebp - 0x8c]
mov dword [ebp - 0x84], eax
call fcn.1000ffc0
test al, al
jne 0x10018173
call fcn.1001731b
mov ecx, dword [eax + 0x1c]
mov dword [ebp - 0x74], ecx
mov ecx, dword [eax + 0x20]
add eax, 0x24
mov dword [ebp - 0x70], ecx
push eax
lea ecx, [ebp - 0x6c]
call fcn.10005790
push 8
pop ecx
lea edi, [ebp - 0x9c]
lea esi, [ebp - 0x74]
xor eax, eax
mov byte [ebp - 4], 3
repe cmpsb byte [esi], byte es:[edi]
je 0x1001813b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x1001816b
mov ecx, dword [ebp - 0x78]
lea eax, [ebp - 0x6c]
push eax
call fcn.10005790
lea ecx, [ebp - 0x6c]
call fcn.10001240
push 0x10040a24
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x2c]
call fcn.10005860
jmp 0x10018267
lea ecx, [ebp - 0x6c]
call fcn.10001240
push ebx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x30], 0xf
call fcn.100012c0
mov eax, dword [ebp - 0x9c]
push ebx
push ebx
push 3
push ebx
push ebx
push 0x80000000
push dword [ebp - 0x7c]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x4c], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x7c], esi
mov byte [ebp - 4], 5
cmp esi, ebx
je 0x1001823e
cmp esi, 0xffffffff
je 0x1001823e
push dword [ebp - 0x90]
call fcn.1001bc35
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x80]
push eax
push dword [ebp - 0x90]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10018237
mov eax, dword [ebp - 0x90]
cmp dword [ebp - 0x80], eax
jne 0x10018237
push eax
push edi
lea esi, [ebp - 0x6c]
call fcn.1000f296
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 6
call fcn.10005d10
mov ecx, esi
mov byte [ebp - 4], 5
call fcn.10001240
lea eax, [ebp - 0x2c]
push eax
call fcn.10018f12
mov ecx, dword [ebp - 0x50]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x4c]
push 0xffffffffffffffff
mov dword [eax + 4], ecx
push ebx
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [eax + 8]
call fcn.10005d10
push edi
call fcn.1001bb58
pop ecx
mov ecx, dword [ebp - 0x78]
lea eax, [ebp - 0x48]
push eax
call fcn.10005790
lea eax, [ebp - 0x7c]
call fcn.10017b37
lea ecx, [ebp - 0x48]
jmp 0x1001814e
mov ecx, dword [ebp - 0x78]
push 0x100358fa
call fcn.10005750
mov eax, dword [ebp - 0x78]
call fcn.1001b7fd
ret 8