Function at 0x10022b95
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x894
mov eax, dword [0x10028014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x878], 0
push ebx
push esi
mov dword [ebp - 0x87c], eax
xor ebx, ebx
cmp dword [ebp + 8], 1
mov eax, dword [ebp + 0x14]
push edi
mov dword [ebp - 0x880], eax
mov edi, ecx
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x884], eax
mov eax, dword [ebp + 0x1c]
push 2
mov dword [ebp - 0x870], edi
mov dword [ebp - 0x888], eax
pop esi
jne 0x10022c12
push 0x3c
call fcn.100267f0
pop ecx
test eax, eax
je 0x10022c04
push dword [edi]
mov ecx, eax
call fcn.100238d7
mov ebx, eax
jmp 0x10022c06
xor ebx, ebx
test ebx, ebx
jne 0x10022c63
push 2
pop eax
jmp 0x100232ef
cmp dword [ebp + 8], esi
je 0x10022c1d
cmp dword [ebp + 8], 3
jne 0x10022c63
push 0x1c
call fcn.100267f0
mov ebx, eax
pop ecx
test ebx, ebx
je 0x10022c56
mov eax, dword [edi]
and dword [ebx + 4], 0
and dword [ebx + 8], 0
or dword [ebx + 0x10], 0xffffffff
mov dword [ebx + 0xc], 0x100015bc
mov dword [ebx + 0x14], eax
and dword [ebx + 0x18], 0
mov dword [ebx], 0x10001610
mov dword [ebx + 0xc], 0x1000160c
jmp 0x10022c58
xor ebx, ebx
test ebx, ebx
jne 0x10022c63
mov eax, esi
jmp 0x100232ef
mov ecx, dword [edi + 4]
mov eax, dword [ecx + 8]
cmp eax, dword [ecx + 0x14]
je 0x100232d7
and dword [ebp - 0x85c], 0
lea eax, [ebp - 0x658]
and dword [ebp - 0x874], 0
mov dword [ebp - 0x860], eax
lea eax, [ebp - 0x85c]
push eax
push 0x100
lea eax, [ebp - 0x858]
mov dword [ebp - 0x86c], 0x100
push eax
call fcn.100245b8
test eax, eax
je 0x10022cd4
push dword [ebp + 0xc]
mov esi, dword [ebx]
lea eax, [ebp - 0x858]
push dword [ebp - 0x85c]
push eax
mov ecx, dword [esi + 4]
call dword [0x10029340]
mov ecx, ebx
call dword [esi + 4]
jmp 0x10022d35
mov eax, dword [ebp - 0x85c]
xor ecx, ecx
mul esi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100267f0
mov esi, eax
mov dword [ebp - 0x874], esi
pop ecx
test esi, esi
je 0x100232b8
mov ecx, dword [edi + 4]
lea eax, [ebp - 0x85c]
push eax
push dword [ebp - 0x85c]
push esi
call fcn.100245b8
test eax, eax
je 0x100232b1
push dword [ebp + 0xc]
mov eax, dword [ebx]
push dword [ebp - 0x85c]
push esi
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x10029340]
mov ecx, ebx
call esi
mov edi, eax
mov eax, dword [ebp - 0x87c]
inc dword [eax]
cmp edi, 0xffffffff
je 0x10023298
mov eax, dword [ebp + 0xc]
push 2
pop esi
cmp eax, 3
jne 0x10022d57
cmp edi, esi
je 0x10022d87
cmp eax, 4
jne 0x10022d61
cmp edi, 3
je 0x10022d87
cmp eax, 5
jne 0x10022d6b
cmp edi, 4
je 0x10022d87
cmp eax, 7
jne 0x10022d75
cmp edi, 0x12
je 0x10022d87
cmp eax, 6
jne 0x10023130
cmp edi, 0x13
jne 0x100231ab
xor eax, eax
mov dword [ebp - 0x85c], eax
mov word [ebp - 0x458], ax
mov word [ebp - 0x258], ax
cmp dword [ebp - 0x878], eax
jne 0x10022de7
cmp dword [0x10001730], 0
mov eax, 0x10001730
mov dword [ebp - 0x878], 1
je 0x10022de7
cmp edi, dword [eax + 4]
je 0x10022dcc
add eax, 8
cmp dword [eax], 0
jne 0x10022dbd
jmp 0x10022de7
push dword [eax]
lea eax, [ebp - 0x258]
push 0x10009594
push 0x100
push eax
call fcn.1001048c
add esp, 0x10
cmp edi, esi
je 0x10022f2c
cmp edi, 3
je 0x10022f2c
cmp edi, 0x12
je 0x10022f2c
cmp edi, 4
je 0x10022e0f
cmp edi, 0x13
jne 0x100231ab
mov esi, 0x100095e4
lea edi, [ebp - 0x14]
push 0
push 0
lea eax, [ebp - 0x864]
movsd dword es:[edi], dword [esi]
push eax
push 0
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebx]
mov ecx, dword [esi + 8]
call dword [0x10029340]
mov ecx, ebx
call dword [esi + 8]
mov eax, dword [ebx]
push 0
push 0
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x10029340]
mov ecx, ebx
call esi
xor ecx, ecx
mov edi, eax
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100267f0
mov esi, dword [ebx]
mov dword [ebp - 0x85c], eax
pop ecx
test eax, eax
je 0x10023285
mov ecx, dword [esi + 0xc]
push edi
push eax
call dword [0x10029340]
mov ecx, ebx
call dword [esi + 0xc]
push dword [ebp - 0x864]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add edi, 0xb
add edi, esi
add edi, eax
cmp edi, 0x100
jbe 0x10022ed7
xor ecx, ecx
mov eax, edi
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100267f0
mov esi, eax
mov dword [ebp - 0x860], esi
pop ecx
test esi, esi
je 0x100232c0
jmp 0x10022ee3
mov esi, dword [ebp - 0x860]
mov edi, dword [ebp - 0x86c]
push dword [ebp - 0x864]
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x14]
push eax
push edi
push esi
call fcn.1001048c
add esp, 0x14
cmp eax, 0x8007007a
je 0x100232c0
mov eax, dword [ebp - 0x85c]
mov edx, edi
push eax
mov ecx, esi
call fcn.1001041e
push 0x100095f4
mov edx, edi
mov ecx, esi
call fcn.10009f1f
jmp 0x10023104
mov esi, dword [ebx]
lea eax, [ebp - 0x458]
push 0x100
push eax
lea eax, [ebp - 0x864]
mov ecx, dword [esi + 8]
push eax
lea eax, [ebp - 0x868]
push eax
call dword [0x10029340]
mov ecx, ebx
call dword [esi + 8]
push 2
pop eax
cmp edi, eax
jne 0x10022f65
mov eax, dword [ebp - 0x880]
jmp 0x10022f76
mov eax, dword [ebp - 0x884]
cmp edi, 3
je 0x10022f76
mov eax, dword [ebp - 0x888]
push ecx
push dword [ebp - 0x864]
mov ecx, dword [ebp - 0x870]
push dword [ebp - 0x868]
push eax
call fcn.10023302
test eax, eax
jne 0x100230fb
cmp word [ebp - 0x458], ax
jne 0x10023049
push 7
pop ecx
push dword [ebp - 0x868]
mov esi, 0x100095a4
lea edi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [ebp - 0x864]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add edi, eax
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add edi, 0xf
add edi, eax
cmp edi, 0x100
jbe 0x1002300c
xor ecx, ecx
mov eax, edi
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100267f0
mov esi, eax
pop ecx
test esi, esi
je 0x100232c0
mov eax, edi
jmp 0x10023018
mov esi, dword [ebp - 0x860]
mov eax, dword [ebp - 0x86c]
push dword [ebp - 0x864]
lea ecx, [ebp - 0x258]
push dword [ebp - 0x868]
push ecx
lea ecx, [ebp - 0x30]
push ecx
push eax
push esi
call fcn.1001048c
add esp, 0x18
cmp eax, 0x8007007a
je 0x100232c0
jmp 0x100231ba
push 8
pop ecx
push dword [ebp - 0x868]
mov esi, 0x100095c0
lea edi, [ebp - 0x54]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [ebp - 0x864]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add edi, eax
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add edi, eax
lea eax, [ebp - 0x458]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add edi, 0x12
add edi, eax
cmp edi, 0x100
jbe 0x100230c2
xor ecx, ecx
mov eax, edi
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100267f0
mov esi, eax
pop ecx
test esi, esi
je 0x100232c0
mov eax, edi
jmp 0x100230ce
mov esi, dword [ebp - 0x860]
mov eax, dword [ebp - 0x86c]
lea ecx, [ebp - 0x458]
push ecx
push dword [ebp - 0x864]
lea ecx, [ebp - 0x258]
push dword [ebp - 0x868]
push ecx
lea ecx, [ebp - 0x54]
push ecx
push eax
push esi
call fcn.1001048c
add esp, 0x1c
jmp 0x10023039
xor eax, eax
mov word [ebp - 0x658], ax
mov eax, dword [ebp - 0x85c]
test eax, eax
je 0x100231b4
push eax
call fcn.100267eb
mov eax, dword [ebx]
pop ecx
push 1
mov esi, dword [eax]
mov ecx, esi
call dword [0x10029340]
mov ecx, ebx
call esi
jmp 0x100231b4
cmp eax, 3
je 0x100231ab
cmp eax, 4
je 0x100231ab
cmp eax, 5
je 0x100231ab
cmp eax, 7
je 0x100231ab
mov edi, dword [ebp - 0x85c]
add edi, 3
cmp edi, 0x100
jbe 0x10023175
xor ecx, ecx
mov eax, edi
mul esi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100267f0
mov esi, eax
pop ecx
test esi, esi
je 0x100232c0
jmp 0x10023181
mov esi, dword [ebp - 0x860]
mov edi, dword [ebp - 0x86c]
mov eax, dword [ebp - 0x874]
mov edx, edi
mov ecx, esi
test eax, eax
jne 0x10023195
lea eax, [ebp - 0x858]
push eax
call fcn.10010399
push 0x100095f4
mov edx, edi
mov ecx, esi
call fcn.1001041e
jmp 0x100231ba
xor eax, eax
mov word [ebp - 0x658], ax
mov esi, dword [ebp - 0x860]
mov edi, dword [ebp - 0x870]
cmp dword [edi + 8], 0
jne 0x10023228
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
push 2
and eax, 0xffff7fff
pop ecx
cmp eax, ecx
jne 0x10023218
lea eax, [ebp - 0x890]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x10023218
push 0
lea eax, [ebp - 0x88c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push esi
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x10023220
push esi
call dword [sym.imp.msvcrt.dll__putws]
pop ecx
mov edi, dword [ebp - 0x870]
jmp 0x10023248
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0
lea ecx, [ebp - 0x88c]
add eax, eax
push ecx
push eax
mov eax, dword [edi + 8]
push esi
push dword [eax + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x658]
cmp esi, eax
je 0x10023259
push esi
call fcn.100267eb
pop ecx
mov eax, dword [ebp - 0x874]
test eax, eax
je 0x1002326a
push eax
call fcn.100267eb
pop ecx
mov ecx, dword [edi + 4]
call fcn.100247c2
mov ecx, dword [edi + 4]
mov eax, dword [ecx + 8]
cmp eax, dword [ecx + 0x14]
je 0x100232d7
push 2
pop esi
jmp 0x10022c72
mov ecx, dword [esi]
push 1
call dword [0x10029340]
mov ecx, ebx
call dword [esi]
jmp 0x10022c0a
mov ecx, dword [ebx]
push 1
mov esi, dword [ecx]
mov ecx, esi
call dword [0x10029340]
mov ecx, ebx
call esi
push 5
jmp 0x10022c0c
push esi
call fcn.100267eb
pop ecx
test ebx, ebx
je 0x10022c0a
mov eax, dword [ebx]
push 1
mov esi, dword [eax]
mov ecx, esi
call dword [0x10029340]
mov ecx, ebx
call esi
jmp 0x10022c0a
test ebx, ebx
je 0x100232ed
mov eax, dword [ebx]
push 1
mov esi, dword [eax]
mov ecx, esi
call dword [0x10029340]
mov ecx, ebx
call esi
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10026d70
mov esp, ebp
pop ebp
ret 0x18