Function at 0x10231cb
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x102cd74]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ecx, ecx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xe4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0xcc], ecx
mov dword [ebp - 0xe8], ecx
mov dword [ebp - 0xe0], ecx
mov dword [ebp - 0xdc], ecx
mov dword [ebp - 0xd8], ecx
mov dword [ebp - 0xd0], ecx
cmp edi, ecx
je 0x1023b22
cmp eax, ecx
je 0x1023b22
xor ebx, ebx
inc ebx
call fcn.01021853
push 0
push 0x80
push 2
push 0
push 5
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc8], eax
cmp eax, 0xffffffff
je 0x1023b22
push 0xf
pop esi
mov eax, esi
lea ecx, [ebp - 0x20]
call fcn.01021586
mov eax, ecx
push eax
push dword [ebp - 0xc8]
call fcn.01020f1f
test eax, eax
jne 0x1023a95
mov ebx, dword [sym.imp.msvcrt.dll_malloc]
mov edi, 0xf0
push edi
call ebx
pop ecx
mov dword [ebp - 0xcc], eax
test eax, eax
je 0x1023a95
push edi
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0
lea eax, [ebp - 0xf0]
push eax
push edi
push dword [ebp - 0xcc]
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1023a95
cmp dword [ebp - 0xf0], edi
jne 0x1023a95
mov eax, dword [ebp - 0xcc]
mov edi, dword [ebp - 0xc8]
and dword [0x102f75c], 0
push 2
mov dword [0x102f764], eax
push 0x102f770
lea eax, [ebp - 0x14]
push eax
push edi
mov dword [0x102f760], esi
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x1004a3c
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
push 4
push 0x102cc30
lea eax, [ebp - 0x14]
push eax
push edi
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x1004a34
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
push 7
push 0x102cc34
lea eax, [ebp - 0x14]
push eax
push edi
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x1004a2c
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
push 0x400
call ebx
pop ecx
mov dword [ebp - 0xe8], eax
test eax, eax
je 0x1023a95
mov ebx, dword [ebp - 0xe8]
xor esi, esi
inc esi
push esi
lea eax, [ebp - 0xc4]
push eax
call fcn.01023061
push dword [ebp - 0xc4]
lea eax, [ebp - 0x14]
push ebx
push eax
push edi
call fcn.010213ae
test eax, eax
jne 0x1023a95
push ebx
mov ebx, dword [sym.imp.msvcrt.dll_free]
call ebx
and dword [ebp - 0xe8], 0
pop ecx
mov ecx, 0x1001a50
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
push 0x2c
push 0x102cc5c
lea eax, [ebp - 0x14]
push eax
push edi
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x1004a24
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
cmp dword [ebp + 0x18], 0
mov edi, 0x1004a1c
lea eax, [ebp - 0xc4]
jne 0x1023471
push edi
push eax
lea eax, [ebp - 0xd0]
push eax
push dword [ebp - 0xe4]
call fcn.010217c2
test eax, eax
jne 0x1023a95
cmp dword [ebp - 0xd0], eax
je 0x1023a95
cmp dword [ebp - 0xc4], 0x32
jl 0x1023a95
mov eax, dword [ebp - 0xd0]
or byte [eax + 0x31], 0x31
mov byte [eax + 9], 0
jmp 0x1023498
push dword [ebp - 0xd4]
push eax
lea eax, [ebp - 0xd0]
push eax
push dword [ebp - 0xe4]
call fcn.010218a5
test eax, eax
jne 0x1023a95
mov eax, dword [ebp - 0xd0]
push dword [ebp - 0xc4]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc8]
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, edi
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
push dword [ebp - 0xd0]
call ebx
cmp dword [ebp + 0x18], 0
pop ecx
mov ebx, 0x1004a14
jne 0x1023509
push dword [ebp - 0xe4]
mov esi, ebx
lea edi, [ebp - 0x14]
call fcn.0102174d
test eax, eax
jne 0x1023a95
push dword [ebp - 0xc8]
mov esi, edi
push dword [ebp - 0xe4]
call fcn.01020d6a
jmp 0x1023548
push 8
pop ecx
xor eax, eax
push 0xc
lea edi, [ebp - 0x40]
rep stosd dword es:[edi], eax
pop eax
mov word [ebp - 0x36], ax
lea eax, [ebp - 0x36]
push eax
mov byte [ebp - 0x3f], 3
call fcn.01020b75
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x34], esi
call fcn.01020b97
push 0x20
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc8]
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, ebx
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
mov edi, 0x1004a0c
cmp dword [ebp + 0x18], eax
jne 0x10235a2
push edi
push 0x24
lea eax, [ebp - 0x9c]
push eax
push dword [ebp - 0xe4]
call fcn.01021787
test eax, eax
jne 0x1023a95
mov word [ebp - 0x7c], ax
mov ax, word [0x102f768]
mov word [ebp - 0x7a], ax
lea eax, [ebp - 0x7a]
push eax
call fcn.01020b75
jmp 0x10235b3
mov ebx, dword [ebp - 0xd4]
lea esi, [ebp - 0x9c]
call fcn.01021af0
push 0x24
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc8]
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, edi
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
mov esi, dword [ebp - 0xd4]
push esi
lea eax, [ebp - 0x9c]
lea ebx, [ebp - 0xc0]
call fcn.0102162a
push 0x24
mov eax, ebx
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc8]
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x1004a04
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
lea edi, [ebp - 0x108]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0xf4]
push eax
push dword [ebp + 0x14]
movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x108]
lea edi, [ebp - 0xec]
call fcn.0102264c
push 4
pop esi
lea eax, [ebp - 0xf8]
push eax
push dword [0x102f768]
mov dword [ebp - 0xc4], esi
call fcn.0100b348
test eax, eax
jl 0x1023a95
mov eax, dword [ebp - 0xf8]
mul esi
lea ecx, [ebp - 0xc4]
push ecx
push edx
push eax
call fcn.01011467
test eax, eax
jl 0x1023a95
push dword [ebp - 0xc4]
mov ebx, dword [sym.imp.msvcrt.dll_malloc]
call ebx
mov esi, eax
pop ecx
test esi, esi
je 0x1023a95
push dword [ebp - 0xc4]
push 0
push esi
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xf4]
add esp, 0xc
push esi
mov dword [esi], eax
call fcn.01020b75
lea eax, [esi + 2]
push eax
call fcn.01020b75
push dword [ebp - 0xc4]
xor eax, eax
mov word [esi + 4], ax
mov word [esi + 6], ax
push esi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc8]
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x10049dc
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
push esi
call dword [sym.imp.msvcrt.dll_free]
cmp dword [ebp + 0x18], 0
pop ecx
jne 0x102376e
push 0x10049d4
push 0x36
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 0xe4]
call fcn.01021787
test eax, eax
jne 0x1023a95
and dword [ebp - 0x70], eax
lea edi, [ebp - 0x64]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x5c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
inc eax
mov word [ebp - 0x46], ax
xor eax, eax
mov word [ebp - 0x44], ax
lea eax, [ebp - 0x46]
push eax
call fcn.01020b75
lea eax, [ebp - 0x44]
push eax
call fcn.01020b75
jmp 0x102377c
mov edi, dword [ebp - 0xd4]
lea esi, [ebp - 0x78]
call fcn.01021bbf
push 0x36
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc8]
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x10049d4
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
lea eax, [ebp - 0xc4]
push eax
push dword [0x102f768]
call fcn.0100b348
test eax, eax
jl 0x1023a95
mov eax, dword [ebp - 0xc4]
push 4
pop ecx
mul ecx
lea ecx, [ebp - 0xc4]
push ecx
push edx
push eax
call fcn.01011467
test eax, eax
jl 0x1023a95
push dword [ebp - 0xc4]
call ebx
pop ecx
mov dword [ebp - 0xe0], eax
test eax, eax
je 0x1023a95
push dword [ebp - 0xc4]
mov esi, eax
push 0
push esi
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xec]
add esp, 0xc
push esi
mov dword [esi], eax
call fcn.01020b75
lea eax, [esi + 2]
push eax
call fcn.01020b75
push dword [ebp - 0xc4]
xor eax, eax
mov word [esi + 4], ax
mov word [esi + 6], ax
push esi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc8]
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x10049e4
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
push esi
call dword [sym.imp.msvcrt.dll_free]
and dword [ebp - 0xe0], 0
mov esi, 0xffff
push esi
call ebx
pop ecx
pop ecx
mov dword [ebp - 0xd8], eax
test eax, eax
je 0x1023a95
lea eax, [ebp - 0xec]
push eax
push dword [ebp + 0x14]
mov eax, dword [ebp - 0xd8]
mov ecx, esi
lea edx, [ebp - 0x108]
call fcn.01022b97
test eax, eax
jne 0x1023a95
lea eax, [ebp - 0xc4]
push eax
push dword [0x102f768]
call fcn.0100b348
test eax, eax
jl 0x1023a95
lea eax, [ebp - 0xc4]
push eax
push 1
push dword [ebp - 0xc4]
call fcn.0100b371
test eax, eax
jl 0x1023a95
mov edi, dword [ebp - 0xc4]
push 4
pop ecx
mov eax, edi
mul ecx
lea ecx, [ebp - 0xc4]
push ecx
push edx
push eax
call fcn.01011467
test eax, eax
jl 0x1023a95
push dword [ebp - 0xc4]
call ebx
pop ecx
mov dword [ebp - 0xdc], eax
test eax, eax
je 0x1023a95
mov ebx, dword [ebp - 0xec]
mov esi, eax
and dword [esi], 0
lea eax, [ebp - 0xd4]
push eax
mov dword [ebp - 0xd4], ebx
call fcn.01020b97
cmp edi, 1
jbe 0x1023954
mov eax, dword [ebp - 0xd4]
lea edx, [esi + 4]
lea ecx, [edi - 1]
mov edi, edx
rep stosd dword es:[edi], eax
push dword [ebp - 0xc4]
lea eax, [ebp - 0x14]
push esi
push eax
push dword [ebp - 0xc8]
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x10049ec
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
push dword [ebp - 0xdc]
call dword [sym.imp.msvcrt.dll_free]
and dword [ebp - 0xdc], 0
pop ecx
push 0x20
push 0x102cc3c
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc8]
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x10049f4
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
push ebx
push dword [ebp - 0xd8]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0xc8]
call fcn.010213ae
test eax, eax
jne 0x1023a95
mov ecx, 0x10049fc
lea eax, [ebp - 0x14]
call fcn.01020ad1
test eax, eax
jne 0x1023a95
push dword [ebp - 0xd8]
call dword [sym.imp.msvcrt.dll_free]
and dword [ebp - 0xd8], 0
mov dword [esp], 0x102146e
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 - 0xc8]
call fcn.01021040
test eax, eax
jne 0x1023a95
mov ecx, dword [ebp - 0xcc]
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0xc8]
push 0xf
pop eax
call fcn.0102149f
test eax, eax
jne 0x1023a95
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xcc]
cmp dword [0x102f764], eax
jne 0x1023a86
and dword [0x102f764], 0
push eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
xor eax, eax
jmp 0x1023b25
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xcc]
xor edi, edi
cmp eax, edi
je 0x1023ac7
cmp dword [0x102f764], eax
jne 0x1023abb
mov dword [0x102f764], edi
mov esi, dword [sym.imp.msvcrt.dll_free]
push eax
call esi
pop ecx
jmp 0x1023acd
mov esi, dword [sym.imp.msvcrt.dll_free]
cmp dword [ebp - 0xe8], edi
je 0x1023ade
push dword [ebp - 0xe8]
call esi
pop ecx
cmp dword [ebp - 0xe0], edi
je 0x1023aef
push dword [ebp - 0xe0]
call esi
pop ecx
cmp dword [ebp - 0xdc], edi
je 0x1023b00
push dword [ebp - 0xdc]
call esi
pop ecx
cmp dword [ebp - 0xd0], edi
je 0x1023b11
push dword [ebp - 0xd0]
call esi
pop ecx
cmp dword [ebp - 0xd8], edi
je 0x1023b22
push dword [ebp - 0xd8]
call esi
pop ecx
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01026cc5
leave
ret 0x14