Function at 0x1001a03
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x1017004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x21c], ecx
push edi
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x214], eax
call fcn.01001911
lea ecx, [ebp - 0x228]
call fcn.010018b2
and dword [ebp - 0x218], 0
test esi, esi
je 0x10076a2
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
lea eax, [esi + edi*2]
push eax
push esi
lea ecx, [ebp - 0x234]
call fcn.01001923
mov dword [ebp - 0x208], eax
test eax, eax
jl 0x1001c12
add edi, 0xa
push edi
lea ecx, [ebp - 0x228]
call fcn.010018c4
mov dword [ebp - 0x208], eax
test eax, eax
jl 0x1001c12
push ebx
push 0xd
xor edi, edi
pop esi
mov eax, dword [ebp - 0x234]
cmp eax, dword [ebp - 0x230]
jae 0x1001aee
lea ecx, [ebp - 0x234]
call fcn.010019ce
mov ebx, eax
cmp ebx, 0xa
je 0x1002bc3
movzx eax, bx
mov dword [ebp - 0x20c], eax
push 1
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x228]
call fcn.01001954
mov dword [ebp - 0x208], eax
test eax, eax
jl 0x1001c11
mov edi, ebx
jmp 0x1001a9b
push 1
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x228]
mov dword [ebp - 0x20c], esi
call fcn.01001954
mov dword [ebp - 0x208], eax
test eax, eax
jl 0x1001c11
push 1
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x228]
mov dword [ebp - 0x20c], 0xa
call fcn.01001954
mov dword [ebp - 0x208], eax
test eax, eax
jl 0x1001c11
cmp byte [0x1017001], 0
mov edi, dword [ebp - 0x228]
mov ebx, dword [ebp - 0x224]
je 0x1001b7a
mov eax, dword [ebp - 0x21c]
cmp byte [eax + 0x25], 0
jne 0x1002de8
push dword [ebp - 0x214]
call fcn.010019ae
test al, al
jne 0x1002de8
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor eax, eax
push eax
push eax
push eax
push eax
push ebx
push edi
push eax
push 1
call esi
mov dword [ebp - 0x21c], eax
test eax, eax
jbe 0x100770d
cmp eax, 0x200
jae 0x10070c8
lea ecx, [ebp - 0x204]
mov dword [ebp - 0x20c], ecx
xor ecx, ecx
push ecx
push ecx
push eax
push dword [ebp - 0x20c]
push ebx
push edi
push ecx
push 1
call esi
mov esi, eax
test esi, esi
je 0x100710a
jbe 0x1001c04
push 0
lea eax, [ebp - 0x210]
push eax
push esi
push dword [ebp - 0x20c]
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100710a
mov eax, dword [ebp - 0x210]
add dword [ebp - 0x20c], eax
sub esi, eax
jne 0x1001bd0
cmp dword [ebp - 0x218], 0
jne 0x10070f9
pop ebx
lea ecx, [ebp - 0x228]
call fcn.010015a1
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x208]
pop edi
xor ecx, ebp
pop esi
call fcn.01001335
leave
ret 8
cmp edi, esi
je 0x1001abf
push 1
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x228]
mov dword [ebp - 0x20c], esi
call fcn.01001954
mov dword [ebp - 0x208], eax
test eax, eax
jge 0x1001abf
jmp 0x1001c11
test ebx, ebx
jbe 0x1001c11
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 0x3fff
cmp ebx, eax
ja 0x1002e01
mov eax, ebx
push 0
lea ecx, [ebp - 0x210]
push ecx
push eax
push edi
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x10076ac
mov eax, dword [ebp - 0x210]
lea edi, [edi + eax*2]
sub ebx, eax
test ebx, ebx
jbe 0x1001c11
jmp 0x1002df6
lea ecx, [eax + 1]
cmp ecx, eax
jb 0x1007715
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x218], eax
test eax, eax
je 0x1007724
mov dword [ebp - 0x20c], eax
mov eax, dword [ebp - 0x21c]
jmp 0x1001bb2
push dword [ebp - 0x218]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x1001c11
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1007733
mov esi, 0x1009ad4
jmp 0x1001a51
call esi
cmp eax, 6
jne 0x10076f4
test ebx, ebx
jbe 0x1001c11
push 0
lea eax, [ebp - 0x210]
push eax
lea eax, [ebx + ebx]
push eax
push edi
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10076f2
shr dword [ebp - 0x210], 1
mov eax, dword [ebp - 0x210]
sub ebx, eax
lea edi, [edi + eax*2]
je 0x1002e2b
jmp 0x10076bb
call esi
test eax, eax
jle 0x1007702
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x208], eax
jmp 0x1001c11
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10076f4
mov dword [ebp - 0x208], 0x8007000e
jmp 0x1001c11
mov dword [ebp - 0x208], 0x8007000e
jmp 0x1001c04
test eax, eax
jle 0x1007741
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x208], eax
jmp 0x1001c04