Function at 0x10002140
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10053ee8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x1006c740]
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 dword [ebp - 0x20], ecx
mov eax, dword [ebp + 8]
mov ecx, 1
mov esi, dword [0x1006d640]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x14], eax
mov eax, 0x55e63b89
mul esi
mov dword [ebp - 0x2c], edi
shr edx, 0x19
imul eax, edx, 0x5f5e100
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x28], 0
sub ecx, eax
mov dword [ebp - 0x3c], 0
add esi, ecx
mov dword [0x1006d640], esi
test edi, edi
je 0x10002341
mov eax, dword [ebx]
test eax, eax
je 0x10002341
push eax
push 0
push edi
call fcn.10037cb0
push 8
call fcn.10035cb1
mov edi, eax
add esp, 0x10
mov dword [ebp - 0x28], edi
test edi, edi
je 0x1000233b
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x2c]
add esi, 0x14
push esi
mov dword [edi], eax
mov dword [edi + 4], ebx
call fcn.10034c5d
mov ebx, eax
add esp, 4
mov dword [ebp - 0x38], ebx
test ebx, ebx
je 0x1000233b
push esi
push 0
push ebx
call fcn.10037cb0
add esp, 0xc
mov dword [ebx], 1
mov dword [ebx + 4], 0
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebx + 8], eax
mov eax, dword [ebp + 0xc]
push eax
push dword [ebp - 0x14]
mov dword [ebx + 0x10], eax
lea eax, [ebx + 0x14]
push eax
call fcn.10037d40
mov esi, dword [ebp - 0x20]
add esp, 0xc
mov eax, dword [0x1006d640]
add esi, 0x28
mov dword [ebx + 0xc], eax
mov dword [ebp - 0x14], eax
push esi
mov dword [ebp - 0x2c], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 4], 0
lea ecx, [ecx + 0x40]
call fcn.10002a80
push esi
mov dword [ebp - 4], 0xffffffff
mov dword [eax], edi
call dword [0x10059108]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], 0
mov edx, dword [eax + 0x48]
test edx, edx
je 0x1000233b
mov edi, dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
push ecx
push 0
mov dword [ebp - 0x1c], 0
add edi, 0x14
mov eax, dword [edx]
mov ecx, edx
push edi
push ebx
call dword [eax]
test eax, eax
je 0x1000233b
push 0x1006e560
push dword [ebp - 0x1c]
call fcn.10036359
mov esi, eax
add esp, 8
mov dword [ebp - 0x3c], esi
test esi, esi
je 0x1000233b
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x1c]
push edx
push esi
push edi
mov ecx, dword [eax + 0x48]
push ebx
mov eax, dword [ecx]
call dword [eax]
test eax, eax
je 0x1000233b
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
push esi
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000233b
push dword [ebp + 0x18]
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
mov eax, dword [ebp - 0x34]
jne 0x10002335
cmp dword [eax], 0
je 0x1000233b
mov dword [ebp - 0x24], 1
jmp 0x1000233b
mov dword [eax], 0
mov esi, dword [0x1006d640]
mov dword [ebp - 0x14], esi
mov esi, dword [ebp - 0x20]
lea ebx, [esi + 0x28]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [esi + 0x40]
call fcn.10002f90
push dword [ebp - 0x18]
mov edi, dword [ebp - 0x2c]
lea ecx, [ebp - 0x14]
mov esi, dword [ebp - 0x30]
push edi
push esi
mov dword [ebp - 0x14], 0
call fcn.100033f0
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x14]
add esp, 0xc
lea ecx, [ecx + 0x40]
push edi
push esi
push eax
call fcn.10002c10
push ebx
call dword [0x10059108]
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x100023a6
push eax
call fcn.100359a3
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x100023b6
push eax
call fcn.10036354
add esp, 4
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x100023d4
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x100023cb
push ecx
call dword [0x10059100]
push ebx
call fcn.10036354
add esp, 4
mov eax, dword [ebp - 0x24]
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.100359a8
mov esp, ebp
pop ebp
ret 0x14