Function at 0x10229cd
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 0x1022a46
cmp dword [0x103c2e8], edi
mov dword [0x102b668], edi
jne 0x10229f5
mov dword [0x103c2e8], eax
cmp dword [0x103c2ec], edi
mov eax, dword [sym.imp.msvcrt.dll__iob]
jne 0x1022a07
mov dword [0x103c2ec], eax
cmp dword [0x103c2f0], edi
jne 0x1022a17
add eax, 0x20
mov dword [0x103c2f0], eax
cmp dword [0x103c2e0], edi
jne 0x1022a41
push 0x4000
push dword [0x103c2ec]
call fcn.0102280e
cmp eax, edi
mov dword [0x103c2e0], eax
jne 0x1022a41
mov dword [esi], edi
xor eax, eax
jmp 0x1022e2d
call fcn.01022701
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 0x1022a8a
movsx eax, word [edi + 0x1005e88]
cmp eax, 0x7d
jl 0x1022a8a
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 0x1022a77
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 0x1022a6b
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 0x1022b06
movsx edx, word [edx + 0x1005802]
cmp eax, edx
jl 0x1022b18
dec esi
sub edi, 4
mov eax, dword [edi]
lea edx, [eax + eax]
movsx eax, word [edx + 0x1005800]
jmp 0x1022af7
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 0x1022b7b
xor edx, edx
cmp dword [0x103c2d4], ebx
jle 0x1022b7b
cmp byte [ecx + edx], 0xa
jne 0x1022b72
inc dword [0x102b66c]
inc edx
cmp edx, dword [0x103c2d4]
jl 0x1022b66
dec eax
cmp eax, 0x28
ja case.default.0x1022b85
jmp dword [eax*4 + 0x1022e32]
mov al, byte [0x103c2dc]
mov edi, esi
sub edi, ecx
dec edi
mov byte [esi], al
cmp dword [ebp + 0x24], ebx
jne 0x1022bb4
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 0x1022c0b
call fcn.010228af
cmp eax, 0xffffffff
je 0x1022e23
cmp eax, ebx
je 0x1022c65
cmp eax, 1
jne 0x1022c37
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 0x1022b7b
mov eax, dword [0x102c2b8]
lea esi, [eax + edi]
mov dword [0x103c2e4], esi
call fcn.010225e2
call fcn.0102267b
cmp eax, ebx
mov ecx, dword [0x102c2b8]
je 0x1022ad7
inc esi
jmp 0x1022a6b
cmp eax, 2
jne case.0x1022b85.31
mov ebp, dword [0x103c2e0]
mov esi, dword [ebp + 4]
add esi, dword [0x103c2d8]
mov dword [0x103c2e4], esi
call fcn.010225e2
mov ecx, dword [0x102c2b8]
jmp 0x1022ad7
mov eax, dword [0x102c2b8]
lea esi, [eax + edi]
mov dword [0x103c2e4], esi
call fcn.010225e2
mov ecx, dword [0x102c2b8]
jmp 0x1022a6b
mov dword [0x103c2e8], 3
jmp case.0x1022b85.31
mov dword [0x103c2e8], 5
jmp case.0x1022b85.31
mov dword [0x103c2e8], 1
jmp case.0x1022b85.31
push dword [0x103c2f0]
push 1
push dword [0x103c2d4]
push ecx
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
jmp case.0x1022b85.31
mov eax, 0x105
jmp 0x1022e2b
mov eax, 0x106
jmp 0x1022e2b
mov eax, 0x108
jmp 0x1022e2b
mov eax, 0x107
jmp 0x1022e2b
mov eax, 0x109
jmp 0x1022e2b
mov eax, 0x10a
jmp 0x1022e2b
mov eax, 0x10b
jmp 0x1022e2b
mov eax, 0x10c
jmp 0x1022e2b
mov eax, 0x10d
jmp 0x1022e2b
mov eax, 0x10e
jmp 0x1022e2b
mov eax, 0x10f
jmp 0x1022e2b
mov eax, 0x110
jmp 0x1022e2b
mov eax, 0x111
jmp 0x1022e2b
mov eax, 0x112
jmp 0x1022e2b
mov eax, 0x113
jmp 0x1022e2b
mov eax, 0x114
jmp 0x1022e2b
mov eax, 0x115
jmp 0x1022e2b
mov eax, 0x116
jmp 0x1022e2b
mov eax, 0x117
jmp 0x1022e2b
mov eax, 0x118
jmp 0x1022e2b
mov eax, 0x119
jmp 0x1022e2b
mov eax, 0x11a
jmp 0x1022e2b
mov eax, 0x11b
jmp 0x1022e2b
push 0x1f
push 0x102c230
push 0xffffffffffffffff
push ecx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, 0x102
jmp 0x1022e2b
push ecx
call dword [sym.imp.msvcrt.dll_atoi]
pop ecx
mov dword [0x102c230], eax
mov eax, 0x103
jmp 0x1022e2b
inc ecx
jmp 0x1022de3
add ecx, 2
push 0x10
push ebx
push ecx
call dword [sym.imp.msvcrt.dll_strtol]
add esp, 0xc
jmp 0x1022dd1
push ecx
call fcn.01022765
mov dword [0x102c230], eax
mov eax, 0x104
jmp 0x1022e2b
movsx eax, byte [ecx]
jmp 0x1022e2b
push 0x1006330
mov dword [0x102c2b8], 0x1006270
mov dword [0x102b66c], ebx
call fcn.01021781
mov eax, dword [esp + 0x14]
mov dword [eax], ebx
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
ret 4