Function at 0x1002ff47
Capabilities:
Read file on windows

Disassembly:
push 0x94
mov eax, 0x10078b5d
call fcn.1004e336
mov esi, edx
mov dword [ebp - 0x98], esi
mov ebx, ecx
mov dword [ebp - 0x94], ebx
mov eax, dword [0x100a48c8]
xor ecx, ecx
mov dword [ebp - 0x9c], ecx
test al, 1
jne 0x1002ffa9
or eax, 1
mov dword [0x100a48c8], eax
mov dword [ebp - 4], ecx
mov dword [0x100a48a8], ecx
mov dword [0x100a48ac], ecx
call fcn.10032ef0
push 0x1007b699
mov dword [0x100a48a8], eax
call fcn.1004df59
or dword [ebp - 4], 0xffffffff
pop ecx
xor ecx, ecx
cmp byte [0x100a0ba4], 0
je 0x1002ffc3
push 0x100a48b0
mov byte [0x100a0ba4], 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 0x1003020b
test byte [ebp - 0x90], 0x10
jne 0x1003020b
cmp dword [ebp - 0x74], 0
ja 0x1003020b
cmp dword [ebp - 0x70], 0xa00000
ja 0x1003020b
push esi
lea ecx, [ebp - 0x2c]
call fcn.1000587d
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.1002580d
add esp, 0xc
mov eax, 0x100a48b0
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.10032eb7
mov esi, dword [ebp - 0x94]
mov edi, dword [0x100a48a8]
cmp esi, edi
je 0x1003009a
lea eax, [esi + 0x10]
push eax
lea ecx, [ebp - 0x2c]
call fcn.1000fd8a
shr eax, 0x1f
test al, al
je 0x1003009c
mov esi, edi
cmp esi, edi
je 0x1003010f
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.10005946
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4c]
mov eax, dword [ecx]
lea edx, [ebp - 0x7c]
cmp eax, dword [edx]
jne 0x10030103
mov eax, dword [ecx + 4]
cmp eax, dword [edx + 4]
jne 0x10030103
lea eax, [ebp - 0x44]
mov ecx, ebx
push eax
call fcn.10005946
lea ecx, [ebp - 0x44]
push 0
push 1
call fcn.10001805
push 0x100a48b0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 1
lea ecx, [ebp - 0x2c]
call fcn.100065b4
jmp 0x10030217
push 0
push 1
lea ecx, [ebp - 0x44]
call fcn.10001805
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 0x80000000
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 0x100301ed
cmp esi, 0xffffffff
je 0x100301ed
push dword [ebp - 0x70]
call fcn.100571ac
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 0x100301e6
mov eax, dword [ebp - 0x70]
cmp dword [ebp - 0x98], eax
jne 0x100301e6
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.100018ee
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x64]
call fcn.10001785
push 0
push 1
lea ecx, [ebp - 0x44]
call fcn.10001805
lea eax, [ebp - 0x2c]
push eax
call fcn.10032df7
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 0x100301e6
push 0xffffffffffffffff
push 0
push eax
call fcn.10001967
push edi
call fcn.10055e19
pop ecx
lea eax, [ebp - 0x64]
mov ecx, ebx
push eax
call fcn.10005946
lea ecx, [ebp - 0x94]
call fcn.1000391f
lea ecx, [ebp - 0x64]
jmp 0x100300de
push 0x10089368
mov ecx, ebx
call fcn.100017d6
mov eax, ebx
call fcn.1004e2e0
ret