Function at 0x10048d94
Capabilities:
Read file on windows

Disassembly:
push 0xb8
mov eax, 0x1006f0e5
call fcn.100657c5
mov esi, ecx
mov dword [ebp - 0xa0], esi
mov eax, dword [ebp + 8]
xor ebx, ebx
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0xac], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xb0], eax
xor eax, eax
and dword [ebp - 0x98], eax
push 0x30
push eax
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x94], edi
mov dword [ebp - 0xc0], 0x1c
call fcn.10057cb0
pop ecx
pop ecx
push edi
push ebx
push ecx
mov ecx, esi
call fcn.100468a3
push 7
pop ecx
xor eax, eax
lea edi, [ebp - 0x5c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x90]
push eax
push dword [ebp - 0xb0]
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
push 0x1038
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x10048e41
mov eax, 0x8007000e
jmp 0x10049179
mov eax, dword [ebp + 0x18]
xor ecx, ecx
push ecx
push dword [ebp - 0x94]
mov dword [edi + 0x10], ecx
mov dword [edi], 0x445356ff
mov dword [edi + 4], 2
mov dword [edi + 0x18], 0x101c
push ecx
push dword [ebp - 0xb4]
mov dword [edi + 0x3c], ecx
mov ecx, esi
mov dword [edi + 0x1c], 1
mov dword [edi + 0x2c], eax
call fcn.10046a24
lea edx, [esi + 0xf4]
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0xc4], edx
inc ecx
inc eax
lock cmpxchg dword [edx], ecx
and dword [ebp - 0xa8], ebx
mov dword [ebp - 0x9c], eax
cmp eax, 1
je 0x10048fce
and dword [ebp - 0x98], 0
lea eax, [ebp - 0x98]
push 0
push eax
push 0xff8
lea eax, [edi + 0x40]
push eax
push dword [ebp - 0xb0]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10048fab
mov eax, dword [ebp - 0x98]
test eax, eax
jne 0x10048ef0
mov dword [ebp - 0xa8], 1
jmp 0x10048f86
add esi, 0x74
mov dword [edi + 0x3c], eax
push esi
mov dword [ebp - 0xbc], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0xb8], 1
mov ecx, dword [ebp - 0xac]
and dword [ebp - 4], 0
push 0x1038
push edi
mov eax, dword [ecx]
push 0xffffffffffffffff
push ecx
call dword [eax + 0x20]
or dword [ebp - 4], 0xffffffff
mov ebx, eax
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 0xb8], 0
test ebx, ebx
jne 0x10048fc8
mov eax, dword [ebp - 0xa4]
xor edx, edx
add eax, dword [ebp - 0x98]
mov dword [ebp - 0xa4], eax
imul eax, eax, 0x64
mov esi, dword [ebp - 0xa0]
mov ecx, esi
div dword [ebp - 0x6c]
push eax
push dword [ebp - 0x94]
push ebx
push dword [ebp - 0xb4]
call fcn.10046a24
push dword [ebp - 0x6c]
mov eax, dword [ebp - 0xa4]
push eax
push ecx
push ecx
mov ecx, esi
call fcn.10046831
xor ecx, ecx
lea edx, [esi + 0xf4]
xor eax, eax
inc ecx
inc eax
lock cmpxchg dword [edx], ecx
cmp dword [ebp - 0xa8], 0
mov dword [ebp - 0x9c], eax
je 0x10048ea1
jmp 0x10048fce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [ebp - 0x9c]
test ebx, ebx
jle 0x10048fce
movzx ebx, bx
or ebx, 0x80070000
jmp 0x10048fce
mov eax, dword [ebp - 0x9c]
cmp dword [ebp - 0xa8], 0
je 0x10048fe8
test ebx, ebx
jne 0x10048fe8
cmp eax, 1
je 0x10048fe8
push 2
pop eax
mov dword [edi + 0x1c], eax
jmp 0x10048ff2
push 2
mov dword [edi + 0x1c], 3
pop eax
and dword [ebp + 0x18], 1
mov esi, dword [ebp - 0xa0]
je 0x1004902b
cmp dword [edi + 0x1c], eax
jne 0x1004902b
push dword [ebp - 0x94]
mov dword [ebp - 0x28], eax
mov ecx, esi
lea eax, [ebp - 0x40]
push eax
call fcn.10046915
push 0
push dword [ebp - 0x94]
lea eax, [ebp - 0x40]
mov ecx, esi
push ebx
push eax
call fcn.10046a24
lea eax, [esi + 0x74]
mov dword [edi + 4], 2
push eax
mov dword [ebp - 0xbc], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0xb8], 1
mov dword [ebp - 4], 1
test ebx, ebx
jne 0x1004908d
mov ecx, dword [ebp - 0xac]
push 0x40
push edi
mov dword [edi + 0x18], 0x24
mov eax, dword [ecx]
push 0xffffffffffffffff
push ecx
call dword [eax + 0x20]
mov ebx, eax
test ebx, ebx
jne 0x1004908d
mov ecx, dword [ebp - 0xac]
lea edx, [ebp - 0xc0]
push edx
lea edx, [ebp - 0x5c]
push edx
mov eax, dword [ecx]
push 0xffffffffffffffff
push ecx
call dword [eax + 0x24]
mov ebx, eax
or dword [ebp - 4], 0xffffffff
lea eax, [esi + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
jne 0x100490a2
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x100490d5
cmp dword [edi + 0x1c], 2
jne 0x100490d5
push 0x64
push dword [ebp - 0x94]
lea eax, [ebp - 0x40]
mov ecx, esi
push ebx
push eax
call fcn.10046a24
push ebx
push dword [ebp - 0x94]
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
call fcn.10046b3b
push ecx
push dword [ebp - 0x94]
test ebx, ebx
je 0x10049118
push 0x20
push ecx
mov ecx, esi
call fcn.100468a3
mov eax, dword [0x10077790]
cmp eax, 0x10077790
je 0x10049122
test byte [eax + 0x1c], 1
je 0x10049122
cmp byte [eax + 0x19], 3
jb 0x10049122
push ebx
push dword [eax + 0x14]
mov edx, 0x100062dc
push dword [eax + 0x10]
push 0x2f
pop ecx
call fcn.1000e7be
jmp 0x10049122
push 0x28
push ecx
mov ecx, esi
call fcn.100468a3
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0xc4]
xor eax, eax
xor ecx, ecx
inc eax
lock cmpxchg dword [edx], ecx
cmp eax, 1
jne 0x1004914b
mov ebx, 0x800703e3
mov eax, dword [0x10077790]
cmp eax, 0x10077790
je 0x10049177
test byte [eax + 0x1c], 1
je 0x10049177
cmp byte [eax + 0x19], 5
jb 0x10049177
push ebx
push dword [eax + 0x14]
mov edx, 0x100062dc
push dword [eax + 0x10]
push 0x30
pop ecx
call fcn.1000e7be
mov eax, ebx
call fcn.1006576f
ret 0x14