Function at 0x1002ae3e
Capabilities:
Read file on windows

Disassembly:
push 0x94
mov eax, 0x1006d1ff
call fcn.10066e10
mov esi, edx
mov dword [ebp - 0x98], esi
mov ebx, ecx
mov dword [ebp - 0x94], ebx
mov eax, dword [0x1008fe08]
xor ecx, ecx
mov dword [ebp - 0x9c], ecx
test al, 1
jne 0x1002aea0
or eax, 1
mov dword [0x1008fe08], eax
mov dword [ebp - 4], ecx
mov dword [0x1008fde8], ecx
mov dword [0x1008fdec], ecx
call fcn.1002bcc2
push 0x1006eb45
mov dword [0x1008fde8], eax
call fcn.1002ee86
or dword [ebp - 4], 0xffffffff
pop ecx
xor ecx, ecx
cmp byte [0x1008ba72], 0
je 0x1002aeba
push 0x1008fdf0
mov byte [0x1008ba72], 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 0x1002b0e3
test byte [ebp - 0x90], 0x10
jne 0x1002b0e3
cmp dword [ebp - 0x74], 0
ja 0x1002b0e3
cmp dword [ebp - 0x70], 0xa00000
ja 0x1002b0e3
push esi
lea ecx, [ebp - 0x2c]
call fcn.1001c700
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.1002bdcf
add esp, 0xc
mov eax, 0x1008fdf0
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.1002bc4f
mov esi, dword [ebp - 0x94]
mov edi, dword [0x1008fde8]
cmp esi, edi
je 0x1002af91
lea eax, [esi + 0x10]
push eax
lea ecx, [ebp - 0x2c]
call fcn.1002be24
shr eax, 0x1f
test al, al
je 0x1002af93
mov esi, edi
cmp esi, edi
je 0x1002affa
mov eax, dword [esi + 0x28]
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x6c], eax
mov eax, dword [esi + 0x2c]
add esi, 0x30
push esi
mov dword [ebp - 0x68], eax
call fcn.10002b60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x6c]
mov eax, dword [ecx]
lea edx, [ebp - 0x7c]
cmp eax, dword [edx]
jne 0x1002aff2
mov eax, dword [ecx + 4]
cmp eax, dword [edx + 4]
jne 0x1002aff2
lea eax, [ebp - 0x64]
mov ecx, ebx
push eax
call fcn.10002b60
lea ecx, [ebp - 0x64]
call fcn.10002a10
push 0x1008fdf0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x2c]
call fcn.1001c6c0
jmp 0x1002b0ef
lea ecx, [ebp - 0x64]
call fcn.10002a10
xor esi, esi
mov dword [ebp - 0x30], 0xf
push esi
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x34], esi
call fcn.100055f0
mov eax, dword [ebp - 0x7c]
push esi
push esi
push 3
push esi
push 7
push closesocket
push dword [ebp - 0x98]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x48], 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 0x1002b0c0
cmp esi, 0xffffffff
je 0x1002b0c0
push dword [ebp - 0x70]
call fcn.1003eb38
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 0x1002b0b9
mov eax, dword [ebp - 0x70]
cmp dword [ebp - 0x98], eax
jne 0x1002b0b9
push eax
push edi
lea ecx, [ebp - 0x64]
call fcn.10002b30
push eax
lea ecx, [ebp - 0x44]
call fcn.10011a80
lea ecx, [ebp - 0x64]
call fcn.10002a10
lea eax, [ebp - 0x2c]
push eax
call fcn.1002bb63
mov ecx, dword [ebp - 0x4c]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x48]
mov dword [eax + 4], ecx
lea ecx, [eax + 8]
lea eax, [ebp - 0x44]
cmp ecx, eax
je 0x1002b0b9
push 0xffffffffffffffff
push 0
push eax
call fcn.100043b0
push edi
call fcn.10038d7d
pop ecx
lea eax, [ebp - 0x44]
mov ecx, ebx
push eax
call fcn.10002b60
cmp esi, 0xffffffff
je 0x1002b0db
test esi, esi
je 0x1002b0db
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x44]
jmp 0x1002afd5
push 0x1007dcfc
mov ecx, ebx
call fcn.10002ad0
mov eax, ebx
call fcn.10066dcb
ret