Function at 0x105b329
Capabilities:
Write file on windows

Disassembly:
push 0x830
push 0x1010b18
call fcn.0104b8c0
mov eax, dword [0x1079e94]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x824], eax
mov edi, 0x200
xor eax, eax
mov dword [ebp - 0x828], eax
mov dword [ebp - 0x838], eax
cmp dword [ebp + 8], eax
jne 0x105b36b
mov dword [ebp + 8], 0x1010b08
mov ecx, dword [ebp + 8]
cmp word [ecx], ax
jne 0x105b37e
mov dword [ebp - 0x82c], eax
jmp 0x105b702
cmp dword [0x107c6bc], eax
jne 0x105b3c9
push 0x1010af4
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
call esi
test eax, eax
je 0x105b3a8
push 0x1010ae8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x107c6bc], eax
cmp dword [0x107c6bc], 0
jne 0x105b3c9
push 0x1010ad0
call esi
push 0x1010ae8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x107c6bc], eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x820], eax
mov eax, dword [0x107c6bc]
test eax, eax
je 0x105b3e9
cmp dword [0x107c6b8], 0
je 0x105b3f4
or ebx, 0xffffffff
mov dword [ebp - 0x820], ebx
jmp 0x105b3f7
or ebx, 0xffffffff
and dword [ebp - 0x834], 0
cmp dword [ebp - 0x820], ebx
je 0x105b4fb
lea ecx, [ebp + 0xc]
push ecx
push dword [ebp + 8]
push edi
lea ecx, [ebp - 0x41c]
push ecx
call eax
add esp, 0x10
mov dword [ebp - 0x834], eax
cmp eax, ebx
jne 0x105b4ac
mov esi, 0x10000
cmp edi, esi
jae 0x105b48b
lea eax, [ebp - 0x41c]
cmp dword [ebp - 0x824], eax
je 0x105b44f
push dword [ebp - 0x824]
call dword [sym.imp.KERNEL32.dll_LocalFree]
add edi, edi
cmp edi, esi
jbe 0x105b457
mov edi, esi
lea eax, [edi + edi]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x824], eax
test eax, eax
je 0x105b497
lea ecx, [ebp + 0xc]
push ecx
push dword [ebp + 8]
push edi
push eax
call dword [0x107c6bc]
add esp, 0x10
mov dword [ebp - 0x834], eax
cmp eax, ebx
je 0x105b431
jmp 0x105b4ac
push 0x8007006f
push 0x2f501a1
jmp 0x105b4a1
push 0x8007000e
push 0x30501a1
call fcn.01053610
mov dword [ebp - 0x820], ebx
cmp dword [ebp - 0x820], ebx
je 0x105b4fb
push dword [ebp - 0x820]
call dword [sym.imp.KERNEL32.dll_GetFileType]
and eax, 0xffff7fff
sub eax, 0
je 0x105b4da
dec eax
dec eax
je 0x105b4fb
mov dword [ebp - 0x838], 1
jmp 0x105b4fb
mov eax, 0x8000ffff
push eax
push eax
push 0x31e01a1
call fcn.0105362d
mov dword [ebp - 0x820], ebx
mov dword [0x107c6b8], 1
xor eax, eax
mov dword [ebp - 0x82c], eax
cmp dword [ebp - 0x820], ebx
je 0x105b6b5
cmp dword [ebp - 0x838], eax
jne 0x105b554
push eax
lea eax, [ebp - 0x82c]
push eax
push dword [ebp - 0x834]
push dword [ebp - 0x824]
push dword [ebp - 0x820]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x105b6ad
call fcn.0106d6ff
push eax
push 0x33001a1
call fcn.01053610
jmp 0x105b6a7
mov esi, dword [ebp - 0x834]
lea esi, [esi + esi + 2]
cmp esi, 0x400
ja 0x105b574
lea eax, [ebp - 0x81c]
mov dword [ebp - 0x828], eax
jmp 0x105b59c
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x828], eax
test eax, eax
jne 0x105b59c
push 0x8007000e
push 0x34601a1
call fcn.01053610
mov dword [ebp - 0x820], ebx
xor edi, edi
cmp dword [ebp - 0x820], ebx
je 0x105b6b5
xor eax, eax
push eax
push eax
push esi
push dword [ebp - 0x828]
push dword [ebp - 0x834]
push dword [ebp - 0x824]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_GetACP]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
jne 0x105b600
call fcn.0106d6ff
push eax
push 0x35f01a1
call fcn.01053610
call esi
push eax
push 0x36001a1
push dword [ebp - 0x824]
call fcn.0105364b
mov dword [ebp - 0x820], ebx
cmp dword [ebp - 0x820], ebx
je 0x105b6b5
mov esi, dword [ebp - 0x828]
mov eax, dword [ebp - 0x834]
mov dword [ebp - 0x82c], eax
and dword [ebp - 0x830], 0
test edi, edi
jbe 0x105b663
cmp byte [esi], 0xa
jne 0x105b654
lea ebx, [esi + 1]
mov eax, edi
sub eax, dword [ebp - 0x830]
push eax
push esi
push ebx
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
mov byte [esi], 0xd
mov esi, ebx
inc dword [ebp - 0x830]
inc edi
or ebx, 0xffffffff
inc dword [ebp - 0x830]
inc esi
cmp dword [ebp - 0x830], edi
jb 0x105b629
push 0
lea eax, [ebp - 0x840]
push eax
push edi
push dword [ebp - 0x828]
push dword [ebp - 0x820]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x105b6ad
call fcn.0106d6ff
mov esi, eax
push esi
push 0x38101a1
call fcn.01053610
cmp esi, 0x80070006
jne 0x105b6ad
mov dword [0x107c6b8], 1
mov dword [ebp - 0x820], ebx
cmp dword [ebp - 0x820], ebx
jne 0x105b702
and dword [ebp - 4], 0
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call dword [sym.imp.msvcrt.dll_vfwprintf]
add esp, 0xc
mov dword [ebp - 0x82c], eax
mov dword [ebp - 4], ebx
jmp 0x105b702
cmp dword [ebp - 0x824], 0
je 0x105b725
lea eax, [ebp - 0x41c]
cmp eax, dword [ebp - 0x824]
je 0x105b725
push dword [ebp - 0x824]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x828], 0
je 0x105b748
lea eax, [ebp - 0x81c]
cmp eax, dword [ebp - 0x828]
je 0x105b748
push dword [ebp - 0x828]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x82c]
mov ecx, dword [ebp - 0x1c]
call fcn.0104b509
call fcn.0104b8fb
ret