Function at 0x1001899e
Capabilities:
Read file on windows

Disassembly:
push 0x94
mov eax, 0x1006b8d6
call fcn.1002f984
mov esi, edx
mov dword [ebp - 0x98], esi
mov ebx, ecx
mov dword [ebp - 0x94], ebx
mov eax, dword [0x10091614]
xor ecx, ecx
mov dword [ebp - 0x9c], ecx
test al, 1
jne 0x10018a00
or eax, 1
mov dword [0x10091614], eax
mov dword [ebp - 4], ecx
mov dword [0x100915f4], ecx
mov dword [0x100915f8], ecx
call fcn.10013a89
push 0x1006e8ab
mov dword [0x100915f4], eax
call fcn.1002f4b9
or dword [ebp - 4], 0xffffffff
pop ecx
xor ecx, ecx
cmp byte [0x1008d950], 0
je 0x10018a1a
push 0x100915fc
mov byte [0x1008d950], cl
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 9
pop ecx
xor eax, eax
lea edi, [ebp - 0x90]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x90]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
cmp dword [ebp - 0x90], 0xffffffff
je 0x10018c67
test byte [ebp - 0x90], 0x10
jne 0x10018c67
cmp dword [ebp - 0x74], 0
ja 0x10018c67
cmp dword [ebp - 0x70], 0xa00000
ja 0x10018c67
push esi
lea ecx, [ebp - 0x2c]
call fcn.100054a2
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x2c]
cmp dword [ebp - 0x18], 8
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
cmovae ecx, dword [ebp - 0x2c]
cmovae edx, dword [ebp - 0x2c]
push edx
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x2c]
cmovae ecx, dword [ebp - 0x2c]
push eax
push ecx
lea ecx, [ebp - 0x94]
call fcn.10006774
add esp, 0xc
mov eax, 0x100915fc
mov dword [ebp - 0xa0], eax
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x94]
push eax
call fcn.1001a835
mov esi, dword [ebp - 0x94]
mov edi, dword [0x100915f4]
cmp esi, edi
je 0x10018af1
lea eax, [esi + 0x10]
push eax
lea ecx, [ebp - 0x2c]
call fcn.10007338
shr eax, 0x1f
test al, al
je 0x10018af3
mov esi, edi
cmp esi, edi
je 0x10018b66
mov eax, dword [esi + 0x28]
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x4c], eax
mov eax, dword [esi + 0x2c]
add esi, 0x30
push esi
mov dword [ebp - 0x48], eax
call fcn.1000562c
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4c]
mov eax, dword [ecx]
lea edx, [ebp - 0x7c]
cmp eax, dword [edx]
jne 0x10018b5a
mov eax, dword [ecx + 4]
cmp eax, dword [edx + 4]
jne 0x10018b5a
lea eax, [ebp - 0x44]
mov ecx, ebx
push eax
call fcn.1000562c
lea ecx, [ebp - 0x44]
push 0
push 1
call fcn.10005a50
push 0x100915fc
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 1
lea ecx, [ebp - 0x2c]
call fcn.10005895
jmp 0x10018c73
push 0
push 1
lea ecx, [ebp - 0x44]
call fcn.10005a50
xor ecx, ecx
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], ecx
mov byte [ebp - 0x64], cl
mov eax, dword [ebp - 0x7c]
push ecx
push ecx
push 3
push ecx
push 7
push SysReAllocString
push dword [ebp - 0x98]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x68], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x94], esi
mov byte [ebp - 4], 5
test esi, esi
je 0x10018c44
cmp esi, 0xffffffff
je 0x10018c44
push dword [ebp - 0x70]
call fcn.10049468
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x98]
push eax
push dword [ebp - 0x70]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10018c3d
mov eax, dword [ebp - 0x70]
cmp dword [ebp - 0x98], eax
jne 0x10018c3d
and dword [ebp - 0x34], 0
lea ecx, [ebp - 0x44]
push eax
push edi
mov dword [ebp - 0x30], 0xf
mov byte [ebp - 0x44], 0
call fcn.10005bc6
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x64]
call fcn.10005589
push 0
push 1
lea ecx, [ebp - 0x44]
call fcn.10005a50
lea eax, [ebp - 0x2c]
push eax
call fcn.1001a727
mov ecx, dword [ebp - 0x6c]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x68]
mov dword [eax + 4], ecx
lea ecx, [eax + 8]
lea eax, [ebp - 0x64]
cmp ecx, eax
je 0x10018c3d
push 0xffffffffffffffff
push 0
push eax
call fcn.10005c3f
push edi
call fcn.10049208
pop ecx
lea eax, [ebp - 0x64]
mov ecx, ebx
push eax
call fcn.1000562c
cmp esi, 0xffffffff
je 0x10018c5f
test esi, esi
je 0x10018c5f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x64]
jmp 0x10018b35
push 0x1007c8e0
mov ecx, ebx
call fcn.100055fd
mov eax, ebx
call fcn.1002f93f
ret