Function at 0x10004fce
Capabilities:
Read file on windows

Disassembly:
push 0xb4
mov eax, 0x10027330
call fcn.100127ba
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 [0x10035680], 1
mov dword [ebp - 0x7c], eax
jne 0x10005015
or dword [0x10035680], 1
mov dword [ebp - 4], ebx
call fcn.10005e36
push 0x100284c7
call fcn.10012b4a
or dword [ebp - 4], 0xffffffff
pop ecx
mov esi, 0x10035668
cmp byte [0x10033ca7], bl
je 0x1000502f
push esi
mov byte [0x10033ca7], 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 0x1000528b
test byte [ebp - 0xb0], 0x10
jne 0x1000528b
cmp dword [ebp - 0x94], ebx
ja 0x1000528b
cmp dword [ebp - 0x90], 0xa00000
ja 0x1000528b
mov eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x2c]
call fcn.10002f00
lea eax, [ebp - 0x8c]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 1
call fcn.10005c92
mov edi, eax
lea eax, [ebp - 0xb8]
lea ecx, [ebp - 0x2c]
call fcn.10005cb2
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0xc0]
lea ecx, [ebp - 0x2c]
call fcn.10005c92
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.10007028
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.10005f8b
mov eax, dword [0x10035660]
mov dword [ebp - 0x80], eax
mov eax, dword [0x10035648]
lea edi, [ebp - 0x84]
lea esi, [ebp - 0x8c]
mov dword [ebp - 0x84], eax
call fcn.100064a8
test al, al
jne 0x100051a4
call fcn.1000647d
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.10002ea0
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 0x1000516c
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x1000519c
mov ecx, dword [ebp - 0x78]
lea eax, [ebp - 0x6c]
push eax
call fcn.10002ea0
lea ecx, [ebp - 0x6c]
call fcn.10002ed0
push 0x10035668
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x2c]
call fcn.10002f70
jmp 0x10005298
lea ecx, [ebp - 0x6c]
call fcn.10002ed0
push ebx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x30], 0xf
call fcn.10003550
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 0x1000526f
cmp esi, 0xffffffff
je 0x1000526f
push dword [ebp - 0x90]
call fcn.10012943
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 0x10005268
mov eax, dword [ebp - 0x90]
cmp dword [ebp - 0x80], eax
jne 0x10005268
push eax
push edi
lea esi, [ebp - 0x6c]
call fcn.10005c6e
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 6
call fcn.10003050
mov ecx, esi
mov byte [ebp - 4], 5
call fcn.10002ed0
lea eax, [ebp - 0x2c]
push eax
call fcn.10005e97
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.10003050
push edi
call fcn.10012866
pop ecx
mov ecx, dword [ebp - 0x78]
lea eax, [ebp - 0x48]
push eax
call fcn.10002ea0
lea ecx, [ebp - 0x7c]
call fcn.100012c0
lea ecx, [ebp - 0x48]
jmp 0x1000517f
mov ecx, dword [ebp - 0x78]
push 0x1002b83b
call fcn.10002e60
mov eax, dword [ebp - 0x78]
call fcn.1001283d
ret 8