Function at 0x10054af4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007be27
mov eax, dword fs:[0]
push eax
mov eax, 0x10d0
call fcn.1006a730
mov eax, dword [0x10099060]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x107c], esi
mov dword [ebp - 0x1078], eax
cmp dword [0x1009db2c], esi
je 0x10054b50
push 0x1009ebf0
mov dword [0x1009db2c], esi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, 0x1009ee80
lea ecx, [ebp - 0x1030]
call fcn.10007820
lea ebx, [ebp - 0x1090]
lea edi, [ebp - 0x1030]
mov dword [ebp - 4], esi
call fcn.1000c710
lea ebx, [ebp - 0x1088]
mov esi, eax
call fcn.1000c760
lea ebx, [ebp - 0x10c0]
mov dword [ebp - 0x107c], eax
call fcn.1000c710
push dword [esi + 4]
mov ecx, dword [ebp - 0x107c]
push dword [esi]
lea esi, [ebp - 0x1080]
push dword [ecx + 4]
push dword [ecx]
push dword [eax + 4]
push dword [eax]
call fcn.1000d9b0
add esp, 0x18
test byte [0x100a21f4], 1
jne 0x10054bdd
or dword [0x100a21f4], 1
mov byte [ebp - 4], 1
call fcn.10054e57
push 0x10080c31
call fcn.1005efa4
pop ecx
mov byte [ebp - 4], 0
and dword [ebp - 0x10b8], 0
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x10b4]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x10b8]
push eax
push 0
push 0x1009ee80
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jne 0x10054c1e
mov ecx, dword [ebp - 0x1078]
push str.default
call fcn.10007750
jmp 0x10054e2c
mov ebx, 0x1009ebf0
push ebx
mov dword [ebp - 0x107c], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x1030]
push eax
lea eax, [ebp - 0x1088]
push eax
mov byte [ebp - 4], 2
call fcn.10054f8d
mov eax, dword [0x100a2110]
mov dword [ebp - 0x108c], eax
mov eax, dword [0x100a20f8]
lea edi, [ebp - 0x1090]
lea esi, [ebp - 0x1088]
mov dword [ebp - 0x1090], eax
call fcn.1003ee1d
test al, al
jne 0x10054cbc
lea edi, [ebp - 0x10a4]
call fcn.10050abd
mov esi, eax
add esi, 0x1c
push 8
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10054c90
sbb eax, eax
sbb eax, 0xffffffff
xor esi, esi
cmp eax, esi
jne 0x10054cbe
lea esi, [ebp - 0x1088]
call fcn.10050abd
mov ecx, dword [ebp - 0x1078]
add eax, 0x24
push eax
call fcn.10007750
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10054e2c
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x1018], 8
mov eax, dword [ebp - 0x102c]
jae 0x10054cda
lea eax, [ebp - 0x102c]
push esi
push esi
push 3
push esi
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x107c], edi
mov byte [ebp - 4], 3
cmp edi, esi
je 0x10054d02
cmp edi, 0xffffffff
jne 0x10054d17
mov ecx, dword [ebp - 0x1078]
push str.default
call fcn.10007750
jmp 0x10054e21
push 0xfff
lea eax, [ebp - 0x1013]
push esi
push eax
mov byte [ebp - 0x1014], 0
call fcn.10062cf0
add esp, 0xc
push esi
lea eax, [ebp - 0x1094]
push eax
mov esi, 0x1000
push esi
lea eax, [ebp - 0x1014]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x10dc]
push esi
push eax
lea ecx, [ebp - 0x1014]
call fcn.10053f44
pop ecx
pop ecx
push 0xc
push 8
pop ecx
lea esi, [ebp - 0x104c]
mov edx, eax
mov byte [ebp - 4], 4
call fcn.100077f0
lea ecx, [ebp - 0x10dc]
call fcn.100077c0
push ebx
mov dword [ebp - 0x1084], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 7
xor eax, eax
cmp dword [ebp - 0x1034], 0x10
push 9
pop ecx
lea edi, [ebp - 0x1070]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x10a4]
mov dword [ebp - 0x1074], eax
mov eax, dword [ebp - 0x10a0]
mov dword [ebp - 0x1070], eax
mov eax, dword [ebp - 0x1048]
jae 0x10054dd0
lea eax, [ebp - 0x1048]
push 0x20
push eax
lea eax, [ebp - 0x106c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x1030]
push eax
call fcn.10054eb8
push 0xa
pop ecx
mov edi, eax
lea esi, [ebp - 0x1074]
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 - 0x1078]
lea eax, [ebp - 0x104c]
push eax
call fcn.10007790
lea ecx, [ebp - 0x104c]
call fcn.100077c0
lea ecx, [ebp - 0x107c]
call fcn.10001340
lea esi, [ebp - 0x1030]
call fcn.1002fe50
mov eax, dword [ebp - 0x1078]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1005ebcb
leave
ret