Function at 0x10031ca0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10063d48
mov eax, dword fs:[0]
push eax
mov eax, 0x10d4
call fcn.10055c00
mov eax, dword [0x1007c060]
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
xor edi, edi
mov ebx, ecx
mov esi, edx
mov dword [ebp - 0x1078], edi
mov dword [ebp - 0x1074], ebx
mov dword [ebp - 0x1080], esi
cmp dword [0x1007f270], edi
je 0x10031d03
push 0x1008047c
mov dword [0x1007f270], edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
cmp esi, edi
jne 0x10031d1a
push str.default
mov ecx, ebx
call fcn.10002d90
mov eax, ebx
jmp 0x10032005
mov eax, esi
lea ecx, [ebp - 0x102c]
call fcn.10002e30
mov dword [ebp - 4], edi
lea ebx, [ebp - 0x1088]
lea edi, [ebp - 0x102c]
call fcn.100088c0
lea ebx, [ebp - 0x10c0]
mov esi, eax
call fcn.10008910
lea ebx, [ebp - 0x10b8]
mov dword [ebp - 0x1078], eax
call fcn.100088c0
push dword [esi + 4]
mov ecx, dword [ebp - 0x1078]
push dword [esi]
lea esi, [ebp - 0x107c]
push dword [ecx + 4]
push dword [ecx]
push dword [eax + 4]
push dword [eax]
push fcn.1004a626
call fcn.100091b0
add esp, 0x1c
test byte [0x100817fc], 1
jne 0x10031da9
or dword [0x100817fc], 1
mov byte [ebp - 4], 1
call fcn.1003201f
push 0x10067602
call fcn.1004a473
pop ecx
mov byte [ebp - 4], 0
and dword [ebp - 0x10b0], 0
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x10ac]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x10b0]
push eax
push 0
push dword [ebp - 0x1080]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jne 0x10031deb
mov ecx, dword [ebp - 0x1074]
push str.default
call fcn.10002d90
jmp 0x10031ff4
mov ebx, 0x1008047c
push ebx
mov dword [ebp - 0x1080], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x102c]
push eax
lea eax, [ebp - 0x107c]
push eax
mov byte [ebp - 4], 2
call fcn.10032155
mov eax, dword [0x10081714]
mov dword [ebp - 0x1084], eax
mov eax, dword [0x100816fc]
lea edi, [ebp - 0x1088]
lea esi, [ebp - 0x107c]
mov dword [ebp - 0x1088], eax
call fcn.1003dd49
test al, al
jne 0x10031e89
lea edi, [ebp - 0x109c]
call fcn.10036332
mov esi, eax
add esi, 0x1c
push 8
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10031e5d
sbb eax, eax
sbb eax, 0xffffffff
xor edi, edi
cmp eax, edi
jne 0x10031e8b
lea esi, [ebp - 0x107c]
call fcn.10036332
mov ecx, dword [ebp - 0x1074]
add eax, 0x24
push eax
call fcn.10002d90
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10031ff4
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x1014], 8
mov eax, dword [ebp - 0x1028]
jae 0x10031ea7
lea eax, [ebp - 0x1028]
push edi
push edi
push 3
push edi
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1078], esi
mov byte [ebp - 4], 3
cmp esi, edi
je 0x10031ecf
cmp esi, 0xffffffff
jne 0x10031ee4
mov ecx, dword [ebp - 0x1074]
push str.default
call fcn.10002d90
jmp 0x10031fe9
push 0xfff
lea eax, [ebp - 0x100f]
push edi
push eax
mov byte [ebp - 0x1010], 0
call fcn.1004e1c0
add esp, 0xc
push edi
lea eax, [ebp - 0x108c]
push eax
push 0x1000
lea eax, [ebp - 0x1010]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x10dc]
push eax
lea ecx, [ebp - 0x1010]
call fcn.100421eb
pop ecx
push 0xc
push 8
push eax
lea esi, [ebp - 0x1048]
mov byte [ebp - 4], 4
call fcn.1002a2e1
lea ecx, [ebp - 0x10dc]
call fcn.10002e00
push ebx
mov dword [ebp - 0x1080], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 7
xor eax, eax
cmp dword [ebp - 0x1030], 0x10
push 9
pop ecx
lea edi, [ebp - 0x106c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x109c]
mov dword [ebp - 0x1070], eax
mov eax, dword [ebp - 0x1098]
mov dword [ebp - 0x106c], eax
mov eax, dword [ebp - 0x1044]
jae 0x10031f98
lea eax, [ebp - 0x1044]
push 0x20
push eax
lea eax, [ebp - 0x1068]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x102c]
push eax
call fcn.10032080
push 0xa
pop ecx
mov edi, eax
lea esi, [ebp - 0x1070]
rep movsd dword es:[edi], dword [esi]
push ebx
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x1074]
lea eax, [ebp - 0x1048]
push eax
call fcn.10002dd0
lea ecx, [ebp - 0x1048]
call fcn.10002e00
lea eax, [ebp - 0x1078]
call fcn.1002509f
lea esi, [ebp - 0x102c]
call fcn.10009500
mov eax, dword [ebp - 0x1074]
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.1004a172
leave
ret