Function at 0x1002a3b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006d5e6
mov eax, dword fs:[0]
push eax
mov eax, 0x1098
call fcn.10064a60
mov eax, dword [0x1008d00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov ebx, ecx
mov dword [ebp - 0x1094], ebx
mov dword [ebp - 0x1090], ebx
and dword [ebp - 0x109c], 0
cmp dword [0x1008d958], 0
je 0x1002a414
and dword [0x1008d958], 0
push 0x10090b5c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
test esi, esi
jne 0x1002a42b
push str.default
mov ecx, ebx
call fcn.100055fd
mov eax, ebx
jmp 0x1002a77d
push esi
lea ecx, [ebp - 0x1028]
call fcn.100054a2
and dword [ebp - 4], 0
lea ecx, [ebp - 0x1028]
cmp dword [ebp - 0x1014], 8
lea edx, [ebp - 0x1028]
mov eax, dword [ebp - 0x1018]
cmovae ecx, dword [ebp - 0x1028]
cmovae edx, dword [ebp - 0x1028]
push edx
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x1028]
cmovae ecx, dword [ebp - 0x1028]
push eax
push ecx
lea ecx, [ebp - 0x1090]
call fcn.10006774
mov eax, dword [0x1009164c]
add esp, 0xc
test al, 1
jne 0x1002a4bf
or eax, 1
mov dword [0x1009164c], eax
mov byte [ebp - 4], 1
and dword [0x10091650], 0
and dword [0x10091654], 0
call fcn.1002a8cd
push 0x1006e8c0
mov dword [0x10091650], eax
call fcn.1002f4b9
pop ecx
mov byte [ebp - 4], 0
push 9
pop ecx
xor eax, eax
lea edi, [ebp - 0x108c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x108c]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jne 0x1002a500
push str.default
mov ecx, ebx
call fcn.100055fd
push 0
push 1
lea ecx, [ebp - 0x1028]
call fcn.10005895
jmp 0x1002a424
mov eax, 0x10090b5c
push eax
mov dword [ebp - 0x1098], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x1028]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x1090]
push eax
call fcn.1002a894
mov esi, dword [ebp - 0x1090]
mov edi, dword [0x10091650]
cmp esi, edi
je 0x1002a54f
lea eax, [esi + 0x10]
push eax
lea ecx, [ebp - 0x1028]
call fcn.10007338
shr eax, 0x1f
test al, al
je 0x1002a551
mov esi, edi
cmp esi, edi
je 0x1002a585
mov eax, dword [esi + 0x28]
lea ecx, [ebp - 0x1078]
cmp eax, dword [ecx]
jne 0x1002a585
mov eax, dword [esi + 0x2c]
cmp eax, dword [ecx + 4]
jne 0x1002a585
add esi, 0x30
mov ecx, ebx
push esi
call fcn.100055fd
push 0x10090b5c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1002a4ec
mov edi, 0x10090b5c
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x1014], 8
lea eax, [ebp - 0x1028]
cmovae eax, dword [ebp - 0x1028]
xor ecx, ecx
push ecx
push ecx
push 3
push ecx
push 3
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x1098], ebx
mov byte [ebp - 4], 3
test ebx, ebx
je 0x1002a74a
cmp ebx, 0xffffffff
je 0x1002a74a
mov esi, 0x1000
lea eax, [ebp - 0x1010]
push esi
push 0
push eax
call fcn.10047f90
add esp, 0xc
lea eax, [ebp - 0x10a0]
push 0
push eax
push esi
lea eax, [ebp - 0x1010]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ecx
lea edx, [ebp - 0x1010]
lea ecx, [ebp - 0x1058]
call fcn.1001d771
pop ecx
push 0xc
push 8
lea ecx, [ebp - 0x1040]
mov byte [ebp - 4], 4
push ecx
mov ecx, eax
call fcn.10005559
push 0
push 1
lea ecx, [ebp - 0x1058]
call fcn.10005a50
push edi
mov dword [ebp - 0x10a4], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
mov byte [ebp - 4], 7
cmp dword [ebp - 0x102c], 0x10
lea edi, [ebp - 0x1064]
push 9
pop ecx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x1078]
mov dword [ebp - 0x1068], eax
mov eax, dword [ebp - 0x1074]
mov dword [ebp - 0x1064], eax
lea eax, [ebp - 0x1040]
cmovae eax, dword [ebp - 0x1040]
push 0x20
push eax
lea eax, [ebp - 0x1060]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x1028]
push eax
lea eax, [ebp - 0x1090]
push eax
call fcn.1002a894
mov esi, dword [ebp - 0x1090]
cmp esi, dword [0x10091650]
je 0x1002a6cc
lea eax, [esi + 0x10]
push eax
lea ecx, [ebp - 0x1028]
call fcn.10007338
test eax, eax
jns 0x1002a6fe
lea eax, [ebp - 0x1028]
mov dword [ebp - 0x1090], eax
lea eax, [ebp - 0x1090]
push ecx
push eax
push ecx
call fcn.1002a9cd
push eax
add eax, 0x10
push eax
push esi
lea eax, [ebp - 0x1090]
push eax
call fcn.1002aa36
mov esi, dword [ebp - 0x1090]
push 0xa
lea edi, [esi + 0x28]
pop ecx
lea esi, [ebp - 0x1068]
rep movsd dword es:[edi], dword [esi]
push 0x10090b5c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0x1094]
lea eax, [ebp - 0x1040]
push eax
mov ecx, esi
and dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
call fcn.10005e17
push 0
push 1
lea ecx, [ebp - 0x1040]
call fcn.10005a50
jmp 0x1002a765
mov esi, dword [ebp - 0x1094]
mov ecx, esi
push str.default
call fcn.100055fd
cmp ebx, 0xffffffff
je 0x1002a76c
test ebx, ebx
je 0x1002a76c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 1
lea ecx, [ebp - 0x1028]
call fcn.10005895
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1002f15a
mov esp, ebp
pop ebp
ret