Function at 0x100022a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002a668
push 0x10022fcd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1002e980
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov esi, dword [0x1002e99c]
mov edi, dword [ebp + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x20], esi
test esi, esi
je 0x100023d4
mov edx, dword [esi]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x24], eax
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10002300
sub ecx, dword [ebp - 0x24]
push 0
lea eax, [ebp - 0x1c]
push eax
push ecx
push edx
push edi
call ebx
mov eax, dword [esi + 8]
and eax, dword [esi + 0xc]
cmp eax, 0xffffffff
je 0x100023b3
push 0
lea eax, [ebp - 0x1c]
push eax
push 1
push 0x100248dc
push edi
call ebx
mov ecx, dword [esi + 8]
mov esi, dword [esi + 0xc]
movzx edx, cx
mov eax, esi
shrd ecx, eax, 0x10
movzx ecx, cx
movzx eax, si
shr esi, 0x10
mov word [ebp - 0x30], si
mov word [ebp - 0x2e], ax
mov word [ebp - 0x2c], cx
mov word [ebp - 0x2a], dx
xor esi, esi
mov dword [ebp - 0x28], esi
cmp esi, 4
jge 0x100023b0
push 0xa
lea eax, [ebp - 0x50]
push eax
movzx eax, word [ebp + esi*2 - 0x30]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__ltoa]
add esp, 0xc
lea eax, [ebp - 0x50]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10002381
sub eax, edx
push 0
lea ecx, [ebp - 0x1c]
push ecx
push eax
lea eax, [ebp - 0x50]
push eax
push edi
call ebx
cmp esi, 3
je 0x100023ad
push 0
lea eax, [ebp - 0x1c]
push eax
push 1
push 0x100248e0
push edi
call ebx
inc esi
jmp 0x1000235e
mov esi, dword [ebp - 0x20]
push 0
lea eax, [ebp - 0x1c]
push eax
push 1
push 0x100248e4
push edi
call ebx
mov esi, dword [esi + 0x10]
jmp 0x100022e7
mov dword [ebp - 4], 0xffffffff
push 0x1002e980
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10002c20
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x800
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x10002c70
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
lea eax, [ebp - 0x800]
push 0x800
push eax
call fcn.10002c10
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 2
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___stdio_common_vsprintf]
add esp, 0x1c
mov byte [ebp - 1], 0
lea eax, [ebp - 0x800]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push str.a_._
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__dup]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_math_l1_1_0.dll__fdopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x10002cb5
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
push esi
call fcn.10002c10
push dword [eax + 4]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___stdio_common_vfprintf]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x1c
pop esi
mov esp, ebp
pop ebp
ret