Function at 0x10228a9
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
xor eax, eax
push edi
inc eax
xor edi, edi
cmp dword [0x102b668], edi
mov dword [esi], eax
je 0x1022922
cmp dword [0x103c2e8], edi
mov dword [0x102b668], edi
jne 0x10228d1
mov dword [0x103c2e8], eax
cmp dword [0x103c2ec], edi
mov eax, dword [sym.imp.msvcrt.dll__iob]
jne 0x10228e3
mov dword [0x103c2ec], eax
cmp dword [0x103c2f0], edi
jne 0x10228f3
add eax, 0x20
mov dword [0x103c2f0], eax
cmp dword [0x103c2e0], edi
jne 0x102291d
push 0x4000
push dword [0x103c2ec]
call fcn.010226ea
cmp eax, edi
mov dword [0x103c2e0], eax
jne 0x102291d
mov dword [esi], edi
xor eax, eax
jmp 0x1022d09
call fcn.010225dd
push ebx
push ebp
mov ecx, dword [0x103c2e4]
mov al, byte [0x103c2dc]
mov byte [ecx], al
mov eax, dword [0x103c2e8]
mov esi, ecx
mov dword [0x102c2c8], eax
mov dword [0x102c2c4], 0x102c2cc
movzx edx, byte [esi]
mov dl, byte [edx*4 + 0x1005900]
jmp 0x1022966
movsx eax, word [edi + 0x1005e88]
cmp eax, 0x7d
jl 0x1022966
mov dl, byte [ebp*4 + 0x1005d00]
lea edi, [eax + eax]
movsx ebx, word [edi + 0x1005d80]
movzx ebp, dl
add ebx, ebp
movsx ebx, word [ebx*2 + 0x1006100]
cmp ebx, eax
jne 0x1022953
movsx eax, word [eax*2 + 0x1005d80]
movzx edx, dl
add eax, edx
movsx eax, word [eax*2 + 0x1005f90]
mov edx, dword [0x102c2c4]
add dword [0x102c2c4], 4
inc esi
cmp eax, 0x7c
mov dword [edx], eax
jne 0x1022947
mov ebp, dword [0x103c2e0]
xor ebx, ebx
mov edi, dword [0x102c2c4]
sub edi, 4
mov eax, dword [edi]
lea edx, [eax + eax]
movsx eax, word [edx + 0x1005800]
mov dword [0x102c2c4], edi
mov dword [0x102c2bc], eax
cmp eax, ebx
je 0x10229e2
movsx edx, word [edx + 0x1005802]
cmp eax, edx
jl 0x10229f4
dec esi
sub edi, 4
mov eax, dword [edi]
lea edx, [eax + eax]
movsx eax, word [edx + 0x1005800]
jmp 0x10229d3
mov edx, esi
sub edx, ecx
mov dword [0x102c2bc], eax
movsx eax, word [eax*2 + 0x10056a0]
cmp eax, 0x26
mov dword [0x102c2b8], ecx
mov dword [0x103c2d4], edx
mov cl, byte [esi]
mov byte [0x103c2dc], cl
mov byte [esi], bl
mov ecx, dword [0x102c2b8]
mov dword [0x102c2c4], edi
mov dword [0x102c2c0], esi
mov dword [0x103c2e4], esi
je 0x1022a57
xor edx, edx
cmp dword [0x103c2d4], ebx
jle 0x1022a57
cmp byte [ecx + edx], 0xa
jne 0x1022a4e
inc dword [0x102b66c]
inc edx
cmp edx, dword [0x103c2d4]
jl 0x1022a42
dec eax
cmp eax, 0x28
ja case.default.0x1022a61
jmp dword [eax*4 + 0x1022d0e]
mov al, byte [0x103c2dc]
mov edi, esi
sub edi, ecx
dec edi
mov byte [esi], al
cmp dword [ebp + 0x24], ebx
jne 0x1022a90
mov eax, dword [ebp + 0x10]
mov dword [0x103c2d8], eax
mov eax, dword [0x103c2ec]
mov dword [ebp], eax
mov dword [ebp + 0x24], 1
mov eax, dword [ebp + 4]
add eax, dword [0x103c2d8]
cmp dword [0x103c2e4], eax
jbe 0x1022ae7
call fcn.0102278b
cmp eax, 0xffffffff
je 0x1022cff
cmp eax, ebx
je 0x1022b41
cmp eax, 1
jne 0x1022b13
mov eax, dword [0x103c2e8]
mov ecx, dword [0x102c2b8]
mov ebp, dword [0x103c2e0]
dec eax
cdq
sub eax, edx
sar eax, 1
mov dword [0x103c2d0], ebx
mov dword [0x103c2e4], ecx
add eax, 0x27
jmp 0x1022a57
mov eax, dword [0x102c2b8]
lea esi, [eax + edi]
mov dword [0x103c2e4], esi
call fcn.010224be
call fcn.01022557
cmp eax, ebx
mov ecx, dword [0x102c2b8]
je 0x10229b3
inc esi
jmp 0x1022947
cmp eax, 2
jne case.0x1022a61.31
mov ebp, dword [0x103c2e0]
mov esi, dword [ebp + 4]
add esi, dword [0x103c2d8]
mov dword [0x103c2e4], esi
call fcn.010224be
mov ecx, dword [0x102c2b8]
jmp 0x10229b3
mov eax, dword [0x102c2b8]
lea esi, [eax + edi]
mov dword [0x103c2e4], esi
call fcn.010224be
mov ecx, dword [0x102c2b8]
jmp 0x1022947
mov dword [0x103c2e8], 3
jmp case.0x1022a61.31
mov dword [0x103c2e8], 5
jmp case.0x1022a61.31
mov dword [0x103c2e8], 1
jmp case.0x1022a61.31
push dword [0x103c2f0]
push 1
push dword [0x103c2d4]
push ecx
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
jmp case.0x1022a61.31
mov eax, 0x105
jmp 0x1022d07
mov eax, 0x106
jmp 0x1022d07
mov eax, 0x108
jmp 0x1022d07
mov eax, 0x107
jmp 0x1022d07
mov eax, 0x109
jmp 0x1022d07
mov eax, 0x10a
jmp 0x1022d07
mov eax, 0x10b
jmp 0x1022d07
mov eax, 0x10c
jmp 0x1022d07
mov eax, 0x10d
jmp 0x1022d07
mov eax, 0x10e
jmp 0x1022d07
mov eax, 0x10f
jmp 0x1022d07
mov eax, 0x110
jmp 0x1022d07
mov eax, 0x111
jmp 0x1022d07
mov eax, 0x112
jmp 0x1022d07
mov eax, 0x113
jmp 0x1022d07
mov eax, 0x114
jmp 0x1022d07
mov eax, 0x115
jmp 0x1022d07
mov eax, 0x116
jmp 0x1022d07
mov eax, 0x117
jmp 0x1022d07
mov eax, 0x118
jmp 0x1022d07
mov eax, 0x119
jmp 0x1022d07
mov eax, 0x11a
jmp 0x1022d07
mov eax, 0x11b
jmp 0x1022d07
push 0x1f
push 0x102c230
push 0xffffffffffffffff
push ecx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, 0x102
jmp 0x1022d07
push ecx
call dword [sym.imp.msvcrt.dll_atoi]
pop ecx
mov dword [0x102c230], eax
mov eax, 0x103
jmp 0x1022d07
inc ecx
jmp 0x1022cbf
add ecx, 2
push 0x10
push ebx
push ecx
call dword [sym.imp.msvcrt.dll_strtol]
add esp, 0xc
jmp 0x1022cad
push ecx
call fcn.01022641
mov dword [0x102c230], eax
mov eax, 0x104
jmp 0x1022d07
movsx eax, byte [ecx]
jmp 0x1022d07
push 0x1006330
mov dword [0x102c2b8], 0x1006270
mov dword [0x102b66c], ebx
call fcn.0102165d
mov eax, dword [esp + 0x14]
mov dword [eax], ebx
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
ret 4