Function at 0x10009810
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x43c
mov eax, dword [0x100701f0]
xor eax, esp
mov dword [esp + 0x438], eax
push ebx
mov ebx, ecx
push esi
push edi
lea edi, [ebx + 8]
push edi
call fcn.1000a620
add esp, 4
lea eax, [esp + 0x10]
lea esi, [ebx + 0xc]
mov ecx, esi
push eax
call fcn.10003fa0
mov eax, dword [0x10072d78]
test eax, eax
je 0x10009879
lea ecx, [esp + 0x10]
push ecx
push dword [ebx + 0xa0]
push dword [ebx + 0xa8]
push dword [ebx + 0xa4]
push dword [ebx]
call eax
add esp, 0x14
test al, al
jne 0x100099f3
test byte [0x10071600], 2
je 0x10009899
cmp dword [esp + 0x24], 0x10
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x1000989e
cmp dword [ebx], 2
jl 0x100098d9
cmp dword [esp + 0x24], 0x10
lea edi, [esp + 0x10]
mov esi, dword [esp + 0x20]
cmovae edi, dword [esp + 0x10]
call fcn.1004650a
add eax, 0x40
push eax
push 1
push esi
push edi
call fcn.1004692f
call fcn.1004650a
add eax, 0x40
push eax
call fcn.10046699
lea edi, [ebx + 8]
add esp, 0x14
lea esi, [ebx + 0xc]
test byte [0x10071600], 1
je 0x10009978
xor edx, edx
xor ecx, ecx
call fcn.10009000
cmp dword [0x10072d80], 0
jne 0x10009908
push 0xffffffffffffffff
push dword [0x10072d7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x10009914
push dword [0x10072d5c]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.10009150
test al, al
je 0x10009955
push 2
push 0
push 0
push dword [0x10072d68]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esp + 0x24], 0x10
lea ecx, [esp + 0xc]
push 0
push ecx
push dword [esp + 0x28]
lea eax, [esp + 0x1c]
cmovae eax, dword [esp + 0x1c]
push eax
push dword [0x10072d68]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x10072d80], 0
jne 0x1000996c
push dword [0x10072d7c]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x10009978
push dword [0x10072d5c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebx], 3
jne 0x100099f3
mov ecx, 0x400
lea eax, [esp + 0x10]
cmp dword [esp + 0x20], ecx
cmovb ecx, dword [esp + 0x20]
cmp dword [esp + 0x24], 0x10
cmovae eax, dword [esp + 0x10]
test ecx, ecx
je 0x100099ac
push ecx
push eax
lea eax, [esp + 0x48]
push eax
call fcn.10042c10
add esp, 0xc
lea eax, [esp + 0x40]
push eax
call fcn.10013e40
add esp, 4
cmp dword [0x10072d74], 0
je 0x10009a76
lea eax, [esp + 0x28]
mov ecx, esi
push eax
call fcn.10003fa0
lea eax, [esp + 0x28]
push eax
call dword [0x10072d74]
add esp, 4
cmp dword [esp + 0x3c], 0x10
jb 0x100099f3
push dword [esp + 0x28]
call fcn.1004245e
add esp, 4
cmp dword [esp + 0x24], 0x10
jb 0x10009a06
push dword [esp + 0x10]
call fcn.1004245e
add esp, 4
push dword [ebx + 0xac]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [edi]
lea esi, [edi + 0x50]
mov eax, dword [eax + 4]
mov dword [eax + esi - 0x50], 0x1006a5c4
mov eax, dword [esi - 0x50]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ecx + esi - 0x54], eax
lea ecx, [esi - 0x4c]
call fcn.100023a0
mov eax, dword [esi - 0x50]
push esi
mov eax, dword [eax + 4]
mov dword [eax + esi - 0x50], 0x1006a628
mov eax, dword [esi - 0x50]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ecx + esi - 0x54], eax
mov dword [esi], 0x1006a618
call fcn.100422a6
mov ecx, dword [esp + 0x448]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10042bf9
mov esp, ebp
pop ebp
ret
call fcn.10008f00
int3