Function at 0x10019e8
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
xor esi, esi
push edi
push esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], esi
call fcn.01001777
cmp dword [ebp + 0xc], 0xc00006ff
lea eax, [ebp + 0x10]
mov dword [ebp - 0xc], eax
jne 0x1001a2d
call fcn.01001756
test eax, eax
je 0x1001a3f
lea eax, [ebp - 0xc]
push eax
push esi
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0xc]
call fcn.01001756
jmp 0x1001a67
cmp dword [ebp + 0xc], 0x800006a4
jb 0x1001a93
call fcn.01001735
test eax, eax
jne 0x1001a55
push esi
push esi
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x1300
jmp 0x1001aa6
lea eax, [ebp - 0xc]
push eax
push esi
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0xc]
call fcn.01001735
mov edi, dword [sym.imp.KERNEL32.dll_FormatMessageW]
push eax
push 0x900
call edi
mov ebx, eax
cmp ebx, esi
jne 0x1001ab6
push esi
push esi
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x1300
call edi
jmp 0x1001aac
lea eax, [ebp - 0xc]
push eax
push esi
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0xc]
push esi
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov ebx, eax
cmp ebx, esi
je 0x1001be8
cmp dword [ebp - 4], esi
je 0x1001be8
cmp dword [ebp + 8], esi
jne 0x1001ac8
xor edi, edi
jmp 0x1001ae3
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_wcslen]
mov edi, eax
mov dword [esp], 0x10012ec
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
add edi, eax
add edi, ebx
lea eax, [edi + edi + 2]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
cmp ebx, esi
je 0x1001bd9
cmp dword [ebp + 8], esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
je 0x1001b1b
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x10012ec
push ebx
call edi
jmp 0x1001b1e
mov word [ebx], si
push dword [ebp - 4]
push ebx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp dword [0x100cdb0], esi
push esi
je 0x1001b4b
lea ecx, [ebp - 0x20]
push ecx
push eax
push ebx
push dword [0x100cdc0]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov dword [ebp - 0x10], eax
jmp 0x1001bc8
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
push esi
push esi
inc eax
push eax
push ebx
push esi
push 1
mov dword [ebp - 0x1c], eax
call edi
cmp eax, esi
mov dword [ebp - 0x18], eax
je 0x1001bbb
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, esi
mov dword [ebp - 0x14], eax
je 0x1001bc1
push esi
push esi
push dword [ebp - 0x18]
push eax
push dword [ebp - 0x1c]
push ebx
push esi
push 1
call edi
cmp eax, esi
je 0x1001ba3
push esi
lea ecx, [ebp - 0x20]
push ecx
push eax
push dword [ebp - 0x14]
push dword [0x100cdc0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x10], eax
jmp 0x1001bb0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], 1
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1001bc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], 1
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x10], esi
jne 0x1001bdf
cmp dword [ebp - 8], esi
jne 0x1001bdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebx
leave
ret