Function at 0x10213f0
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x1029fe8]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0xe0], eax
mov eax, dword [ebp + 0x10]
push esi
mov dword [ebp - 0xd8], eax
xor eax, eax
push edi
mov edi, dword [ebp + 0xc]
mov bx, 1
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0xe8], eax
mov dword [ebp - 0xe4], eax
mov dword [ebp - 0xdc], eax
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0xd0], eax
call fcn.0101fe95
push 0
push 0x80
push 2
push 0
push 5
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0xc4], eax
je 0x1021cb1
push 0xf
pop eax
lea ecx, [ebp - 0x20]
call fcn.0101fb35
mov eax, ecx
push eax
push dword [ebp - 0xc4]
call fcn.0101f59f
test eax, eax
jne 0x1021c37
mov esi, dword [sym.imp.msvcrt.dll_malloc]
mov ebx, 0xf0
push ebx
call esi
test eax, eax
pop ecx
mov dword [ebp - 0xcc], eax
je 0x1021c37
mov edi, dword [ebp - 0xcc]
push 0x3c
pop ecx
xor eax, eax
push eax
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xec]
push eax
push ebx
push dword [ebp - 0xcc]
push dword [ebp - 0xc4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1021c37
cmp dword [ebp - 0xec], ebx
jne 0x1021c37
mov eax, dword [ebp - 0xcc]
and dword [0x102cdfc], 0
push 2
mov dword [0x102ce04], eax
push 0x102ce10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
mov dword [0x102ce00], 0xf
call fcn.0101f9b4
test eax, eax
jne 0x1021c37
mov ecx, 0x100483c
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c37
push 4
push 0x1029f00
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c37
mov ecx, 0x1004834
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c37
push 7
push 0x1029f04
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c37
mov ecx, 0x100482c
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c37
push 0x400
call esi
test eax, eax
pop ecx
mov dword [ebp - 0xe8], eax
je 0x1021c37
mov edi, dword [ebp - 0xe8]
push 1
lea eax, [ebp - 0xc8]
push eax
call fcn.0101fbd2
push dword [ebp - 0xc8]
lea eax, [ebp - 0x14]
push edi
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c37
mov ebx, dword [sym.imp.msvcrt.dll_free]
push edi
call ebx
and dword [ebp - 0xe8], 0
pop ecx
mov ecx, 0x10019d0
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
push 0x2c
push 0x1029f2c
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, 0x1004824
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
cmp dword [ebp + 0x18], 0
mov esi, 0x100481c
lea eax, [ebp - 0xc8]
jne 0x102167f
push esi
push eax
lea eax, [ebp - 0xd0]
push eax
push dword [ebp - 0xe0]
call fcn.0101fe1b
test eax, eax
jne 0x1021c3d
mov eax, dword [ebp - 0xd0]
or byte [eax + 0x31], 0x31
mov byte [eax + 9], 0
jmp 0x10216a6
push dword [ebp - 0xd8]
push eax
lea eax, [ebp - 0xd0]
push eax
push dword [ebp - 0xe0]
call fcn.0101fee0
test eax, eax
jne 0x1021c3d
mov eax, dword [ebp - 0xd0]
push dword [ebp - 0xc8]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, esi
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
push dword [ebp - 0xd0]
call ebx
cmp dword [ebp + 0x18], 0
pop ecx
mov esi, 0x1004814
jne 0x1021715
push dword [ebp - 0xe0]
lea edi, [ebp - 0x14]
call fcn.0101fdbe
test eax, eax
jne 0x1021c3d
push dword [ebp - 0xc4]
mov eax, edi
push dword [ebp - 0xe0]
call fcn.0101f43a
jmp 0x1021757
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x64]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x5a]
push eax
mov byte [ebp - 0x63], 3
mov word [ebp - 0x5a], 0xc
call fcn.0101f2aa
lea eax, [ebp - 0x58]
push eax
mov dword [ebp - 0x58], 1
call fcn.0101f2ca
push 0x20
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, esi
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
cmp dword [ebp + 0x18], eax
mov edi, 0x100480c
jne 0x10217ba
push edi
push 0x24
lea eax, [ebp - 0xc0]
push eax
push dword [ebp - 0xe0]
call fcn.0101fdef
test eax, eax
jne 0x1021c3d
and word [ebp - 0xa0], ax
mov ax, word [0x102ce08]
mov word [ebp - 0x9e], ax
lea eax, [ebp - 0x9e]
push eax
call fcn.0101f2aa
jmp 0x10217d1
mov ebx, dword [ebp - 0xd8]
lea esi, [ebp - 0xc0]
call fcn.010200f1
mov ebx, dword [sym.imp.msvcrt.dll_free]
push 0x24
lea eax, [ebp - 0xc0]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, edi
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
push 9
pop ecx
lea esi, [ebp - 0xc0]
lea edi, [ebp - 0x44]
rep movsd dword es:[edi], dword [esi]
mov word [ebp - 0x38], ax
mov word [ebp - 0x36], ax
mov word [ebp - 0x32], ax
lea eax, [ebp - 0x30]
push eax
mov word [ebp - 0x30], 1
call fcn.0101f2aa
mov ax, word [0x102ce08]
mov word [ebp - 0x22], ax
lea eax, [ebp - 0x22]
push eax
call fcn.0101f2aa
push 0x24
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, 0x1004804
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
mov esi, dword [ebp - 0xd8]
lea edi, [ebp - 0x104]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0xf0]
push eax
push dword [ebp + 0x14]
movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x104]
lea edi, [ebp - 0xf4]
call fcn.01020b73
mov eax, dword [0x102ce08]
shl eax, 2
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, eax
test esi, esi
pop ecx
je 0x1021c3d
mov ecx, dword [0x102ce08]
shl ecx, 2
mov dword [ebp - 0xc8], ecx
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0xf0]
push esi
mov dword [esi], eax
call fcn.0101f2aa
lea eax, [esi + 2]
push eax
call fcn.0101f2aa
push dword [ebp - 0xc8]
and word [esi + 4], 0
and word [esi + 6], 0
push esi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, 0x10047dc
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
push esi
call ebx
cmp dword [ebp + 0x18], 0
pop ecx
mov esi, 0x10047cc
lea eax, [ebp - 0x9c]
jne 0x102198b
push esi
push 0x36
push eax
push dword [ebp - 0xe0]
call fcn.0101fdef
test eax, eax
jne 0x1021c3d
and dword [ebp - 0x94], eax
lea edi, [ebp - 0x88]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x80]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
and word [ebp - 0x68], 0
lea eax, [ebp - 0x6a]
push eax
mov word [ebp - 0x6a], 1
call fcn.0101f2aa
lea eax, [ebp - 0x68]
push eax
call fcn.0101f2aa
jmp 0x102199c
mov ebx, dword [ebp - 0xd8]
call fcn.010201a6
mov ebx, dword [sym.imp.msvcrt.dll_free]
push 0x36
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, esi
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
mov eax, dword [0x102ce08]
shl eax, 2
push eax
call dword [sym.imp.msvcrt.dll_malloc]
test eax, eax
pop ecx
mov dword [ebp - 0xe4], eax
je 0x1021c3d
mov ecx, dword [0x102ce08]
mov esi, dword [ebp - 0xe4]
shl ecx, 2
mov dword [ebp - 0xc8], ecx
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0xf4]
push esi
mov dword [esi], eax
call fcn.0101f2aa
lea eax, [esi + 2]
push eax
call fcn.0101f2aa
push dword [ebp - 0xc8]
and word [esi + 4], 0
and word [esi + 6], 0
push esi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, 0x10047e4
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
push esi
call ebx
mov edi, dword [sym.imp.msvcrt.dll_malloc]
and dword [ebp - 0xe4], 0
mov esi, 0xffff
push esi
call edi
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0xd4], eax
je 0x1021c3d
mov ecx, dword [ebp - 0xd4]
lea eax, [ebp - 0xd8]
push eax
push dword [ebp + 0x14]
mov eax, esi
lea edx, [ebp - 0x104]
call fcn.01021093
test eax, eax
jne 0x1021c3d
mov eax, dword [0x102ce08]
lea eax, [eax*4 + 4]
push eax
call edi
test eax, eax
pop ecx
mov dword [ebp - 0xdc], eax
je 0x1021c3d
mov esi, eax
mov eax, dword [ebp - 0xd8]
and dword [esi], 0
mov dword [ebp - 0xc8], eax
lea eax, [ebp - 0xc8]
push eax
call fcn.0101f2ca
mov edx, dword [0x102ce08]
lea eax, [edx + 1]
cmp eax, 1
jle 0x1021b0b
lea ecx, [eax - 1]
mov eax, dword [ebp - 0xc8]
lea edi, [esi + 4]
rep stosd dword es:[edi], eax
lea eax, [edx*4 + 4]
push eax
push esi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, 0x10047ec
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
push dword [ebp - 0xdc]
call ebx
and dword [ebp - 0xdc], 0
pop ecx
push 0x20
push 0x1029f0c
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, 0x10047f4
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
push dword [ebp - 0xd8]
lea eax, [ebp - 0x14]
push dword [ebp - 0xd4]
push eax
push dword [ebp - 0xc4]
call fcn.0101f9b4
test eax, eax
jne 0x1021c3d
mov ecx, 0x10047fc
lea eax, [ebp - 0x14]
call fcn.0101f221
test eax, eax
jne 0x1021c3d
push dword [ebp - 0xd4]
call ebx
and dword [ebp - 0xd4], 0
mov dword [esp], 0x101fa51
push 0x10
push 0xf
push dword [ebp - 0xcc]
call dword [sym.imp.msvcrt.dll_qsort]
add esp, 0x10
push 0xf
push dword [ebp - 0xcc]
push dword [ebp - 0xc4]
call fcn.0101f6a9
test eax, eax
jne 0x1021c3d
mov ecx, dword [ebp - 0xcc]
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0xc4]
push 0xf
pop eax
call fcn.0101fa75
test eax, eax
jne 0x1021c3d
push dword [ebp - 0xc4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xcc]
call ebx
pop ecx
xor eax, eax
jmp 0x1021cb4
mov ebx, dword [sym.imp.msvcrt.dll_free]
push dword [ebp - 0xc4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
cmp dword [ebp - 0xcc], esi
je 0x1021c5c
push dword [ebp - 0xcc]
call ebx
pop ecx
cmp dword [ebp - 0xe8], esi
je 0x1021c6d
push dword [ebp - 0xe8]
call ebx
pop ecx
cmp dword [ebp - 0xe4], esi
je 0x1021c7e
push dword [ebp - 0xe4]
call ebx
pop ecx
cmp dword [ebp - 0xdc], esi
je 0x1021c8f
push dword [ebp - 0xdc]
call ebx
pop ecx
cmp dword [ebp - 0xd0], esi
je 0x1021ca0
push dword [ebp - 0xd0]
call ebx
pop ecx
cmp dword [ebp - 0xd4], esi
je 0x1021cb1
push dword [ebp - 0xd4]
call ebx
pop ecx
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01023881
leave
ret 0x14