Function at 0x1023d33
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
xor ebx, ebx
push esi
mov esi, ecx
cmp dword [esi + 0x10], 0xffffffff
push edi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
jne 0x1023d6b
push 0x1003a70
push 0x2c9
push 0x1003770
call fcn.01028938
cmp byte [ebp + 0xc], bl
je 0x1023e66
cmp byte [esi + 0xc], bl
je 0x1023dad
push 6
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov edi, eax
mov dword [ebp - 8], edi
cmp edi, ebx
je 0x1024053
xor eax, eax
mov esi, 0x1003a68
push esi
stosd dword es:[edi], eax
push 0x1001bfc
stosw word es:[edi], ax
push 3
push dword [ebp - 8]
call fcn.0100cfad
add esp, 0x10
jmp 0x1023dfc
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1023db3
sub eax, edx
sar eax, 1
lea edi, [eax + 5]
lea esi, [edi + edi]
push esi
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1024053
push esi
push ebx
push eax
call sub.msvcrt.dll_memset
mov esi, 0x1003a68
push esi
push esi
push dword [ebp + 8]
push 0x1003a58
push edi
push dword [ebp - 8]
call fcn.0100cfad
add esp, 0x24
cmp eax, ebx
mov dword [ebp + 0xc], eax
jl 0x1024144
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1023e0d
sub eax, edx
sar eax, 1
lea edi, [eax + 5]
lea eax, [edi + edi]
push eax
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x1024053
lea eax, [edi + edi]
push eax
push ebx
push dword [ebp - 4]
call sub.msvcrt.dll_memset
push esi
push esi
push dword [ebp + 8]
push 0x1003a58
push edi
push dword [ebp - 4]
call fcn.0100cfad
add esp, 0x24
cmp eax, ebx
mov dword [ebp + 0xc], eax
jl 0x1024144
mov esi, dword [ebp - 0x14]
jmp 0x1023e96
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call fcn.01028a2f
cmp eax, ebx
mov dword [ebp + 0xc], eax
jl 0x1024144
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
call fcn.01028a2f
cmp eax, ebx
mov dword [ebp + 0xc], eax
jl 0x1024144
mov edx, dword [esi + 0x18]
cmp edx, 0xffffffff
je 0x1023f04
mov eax, dword [ebp - 4]
lea edi, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1023ea4
sub eax, edi
push ebx
sar eax, 1
lea ecx, [ebp - 0xc]
push ecx
add eax, eax
push eax
push dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1023f04
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1024131
test byte [eax + 0x1c], 8
je 0x1024131
cmp byte [eax + 0x19], 2
jb 0x1024131
push esi
push dword [ebp - 4]
push 0x1003760
push 0x1e
jmp 0x1024126
cmp byte [esi + 0x14], bl
je 0x1023fb1
mov eax, dword [ebp - 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1023f13
push ebx
sub eax, edx
lea ecx, [ebp - 0xc]
push ecx
sar eax, 1
push eax
push dword [ebp - 8]
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x1023f73
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1024131
test byte [eax + 0x1c], 8
je 0x1024131
cmp byte [eax + 0x19], 2
jb 0x1024131
push esi
push dword [ebp - 8]
push 0x1003760
push 0x1f
jmp 0x1024126
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1024144
test byte [eax + 0x1c], 8
je 0x1024144
cmp byte [eax + 0x19], 4
jb 0x1024144
push dword [ebp - 8]
push 0x1003760
push 0x20
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01007db4
jmp 0x1024144
mov esi, dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [ebp - 4]
push ebx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push eax
call edi
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x1024017
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1024131
test byte [eax + 0x1c], 8
je 0x1024131
cmp byte [eax + 0x19], 2
jb 0x1024131
push esi
push 0x1003760
push 0x21
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010053b9
jmp 0x1024131
push eax
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov dword [ebp - 0x10], eax
cmp eax, ebx
jne 0x102405f
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1024053
test byte [eax + 0x1c], 8
je 0x1024053
cmp byte [eax + 0x19], 2
jb 0x1024053
push dword [ebp + 8]
push 0x1003760
push 0x22
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010053b9
mov dword [ebp + 0xc], 0x8007000e
jmp 0x1024144
push ebx
push ebx
push dword [ebp + 8]
push eax
push 0xffffffffffffffff
push dword [ebp - 4]
push ebx
call esi
push eax
call edi
cmp eax, ebx
jne 0x10240ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1024131
test byte [eax + 0x1c], 8
je 0x1024131
cmp byte [eax + 0x19], 2
jb 0x1024131
push esi
push 0x1003760
push 0x23
jmp 0x1024007
push ebx
lea ecx, [ebp - 0xc]
push ecx
dec eax
push eax
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1024144
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xe8
jne 0x1024103
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1024144
test byte [eax + 0x1c], 8
je 0x1024144
cmp byte [eax + 0x19], 4
jb 0x1024144
push 0x1003760
push 0x24
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01005393
jmp 0x1024144
mov eax, dword [0x1032370]
cmp eax, 0x1032370
je 0x1024131
test byte [eax + 0x1c], 8
je 0x1024131
cmp byte [eax + 0x19], 2
jb 0x1024131
push esi
push dword [ebp - 4]
push 0x1003760
push 0x25
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01007e21
cmp esi, ebx
jle 0x1024141
and esi, 0xffff
or esi, 0x80070000
mov dword [ebp + 0xc], esi
push dword [ebp - 8]
mov esi, dword [sym.imp.ole32.dll_CoTaskMemFree]
call esi
push dword [ebp - 4]
call esi
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_free]
mov eax, dword [ebp + 0xc]
pop ecx
pop edi
pop esi
pop ebx
leave
ret 8