Function at 0x1000158f
Capabilities:
Clear file content
Create process on windows
Resolve function by parsing pe exports
Write and execute a file

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x230
mov dword [esp + 0x22c], 0x57c
mov eax, esp
lea ecx, [esp + 0x22c]
mov dword [eax + 8], ecx
mov dword [eax + 4], 0xaae
mov dword [eax], 0xd1290f
mov eax, dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
call eax
sub esp, 0xc
mov ecx, esp
mov dword [ecx], 0x1db73
mov ecx, dword [sym.imp.USER32.dll_GetMenuItemCount]
mov dword [esp + 0xa4], eax
call ecx
sub esp, 4
mov ecx, esp
lea edx, [esp + 0x218]
mov dword [ecx + 4], edx
mov dword [ecx], 0x2ef9f2
mov ecx, dword [sym.imp.USER32.dll_GetWindowRect]
mov dword [esp + 0xa0], eax
call ecx
sub esp, 8
mov dword [esp + 0x214], 0x986
mov ecx, esp
lea edx, [esp + 0x214]
mov dword [ecx + 4], edx
mov dword [ecx], 0x8377e0
mov ecx, dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov dword [esp + 0x9c], eax
call ecx
sub esp, 8
mov ecx, esp
mov dword [ecx + 8], 0xd96
mov dword [ecx + 4], str.uk5sB_
mov dword [ecx], 0xe6f
mov ecx, dword [sym.imp.USER32.dll_CharNextExA]
mov dword [esp + 0x98], eax
call ecx
sub esp, 0xc
mov ecx, esp
lea edx, [esp + 0x208]
mov dword [ecx + 4], edx
mov dword [ecx], 0x96ce39
mov ecx, dword [sym.imp.GDI32.dll_GetDCOrgEx]
mov dword [esp + 0x94], eax
call ecx
sub esp, 8
xor ecx, ecx
lea edx, [esp + 0xa8]
lea esi, [esp + 0x138]
mov dword [esp + 0x90], eax
mov dword [esp + 0x8c], edx
mov dword [esp + 0x88], esi
mov dword [esp + 0x84], ecx
jmp 0x10001798
mov eax, esp
mov dword [eax], 0x44c
mov eax, dword [sym.imp.GDI32.dll_GdiSetBatchLimit]
call eax
sub esp, 4
mov ecx, esp
lea edx, [esp + 0x1f8]
mov dword [ecx + 4], edx
mov dword [ecx], 0x4b48d4
mov ecx, dword [sym.imp.GDI32.dll_GetViewportExtEx]
mov dword [esp + 0x80], eax
call ecx
sub esp, 8
mov ecx, esp
mov dword [ecx + 0x10], 0x45d
mov dword [ecx + 0xc], 0xa00
mov dword [ecx + 8], 0xa00
mov dword [ecx + 4], 0x45d
mov dword [ecx], 0x8a9466
mov ecx, dword [sym.imp.USER32.dll_CopyImage]
mov dword [esp + 0x7c], eax
call ecx
sub esp, 0x14
mov dword [esp + 0x78], eax
jmp 0x100019a3
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x74]
mov ecx, 0x12
mov dword [esp + 0x70], eax
xor edx, edx
div ecx
cmp edx, 2
je 0x10001859
jmp 0x1000186f
mov eax, esp
mov dword [eax], 0xa28cde
mov eax, dword [sym.imp.KERNEL32.dll_SetEndOfFile]
call eax
sub esp, 4
mov ecx, 0x9be454
mov dword [esp + 0x204], ecx
mov ecx, esp
lea edx, [esp + 0x204]
mov dword [ecx], edx
mov dword [ecx + 4], 0xeb29f9
mov ecx, dword [sym.imp.ADVAPI32.dll_SetThreadToken]
mov dword [esp + 0x6c], eax
call ecx
sub esp, 8
mov dword [esp + 0x68], eax
jmp 0x100016b5
mov eax, dword [esp + 0x84]
mov ecx, esp
mov dword [ecx + 4], 0x61a
mov dword [ecx], 0x9e1f33
mov ecx, dword [sym.imp.USER32.dll_WaitForInputIdle]
mov dword [esp + 0x64], eax
call ecx
sub esp, 8
mov ecx, esp
mov dword [ecx + 0x10], 0xb12
mov dword [ecx + 0xc], 0xaca
mov dword [ecx + 8], 0xb12
mov dword [ecx + 4], 0xb12
mov dword [ecx], 0x418ae0
mov ecx, dword [sym.imp.GDI32.dll_ExcludeClipRect]
mov dword [esp + 0x60], eax
call ecx
sub esp, 0x14
mov ecx, esp
mov dword [ecx + 8], 0xbd2
mov dword [ecx + 4], 0x89172f
mov dword [ecx], 0x93e4f2
mov ecx, dword [sym.imp.USER32.dll_GetDCEx]
mov dword [esp + 0x5c], eax
call ecx
sub esp, 0xc
mov ecx, esp
mov dword [ecx], 0x34bf39
mov ecx, dword [sym.imp.KERNEL32.dll_SetCommBreak]
mov dword [esp + 0x58], eax
call ecx
sub esp, 4
mov ecx, esp
mov dword [ecx + 4], 0xf30
mov dword [ecx], str.o_OP_e
mov ecx, dword [sym.imp.KERNEL32.dll_WinExec]
mov dword [esp + 0x54], eax
call ecx
sub esp, 8
xor ecx, ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x74], ecx
jmp 0x1000172e
mov eax, esp
mov dword [eax], 0x38e78d
mov eax, dword [sym.imp.USER32.dll_SetClipboardViewer]
call eax
sub esp, 4
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x70]
add eax, 1
cmp eax, 0x317
mov dword [esp + 0x74], eax
jne 0x1000172e
xor eax, eax
xor ecx, ecx
mov edx, dword [esp + 0x64]
sub edx, 4
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], edx
je 0x100016b5
jmp 0x100018a6
mov eax, dword [esp + 0x64]
sub eax, 0x3b
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
je 0x10001750
jmp 0x100018c1
mov eax, dword [esp + 0x38]
add eax, 1
mov ecx, esp
mov dword [ecx + 8], 0x41cc86
mov dword [ecx + 4], 0x3dacc2
mov dword [ecx], 0xaf3
mov ecx, dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [esp + 0x34], eax
call ecx
sub esp, 0xc
xor ecx, ecx
mov edx, 0x90
mov esi, 0xc0
mov edi, dword [esp + 0x88]
mov dword [esp], edi
mov dword [esp + 4], 0
mov dword [esp + 8], 0xc0
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], esi
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x8c]
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0x90
call sub.msvcrt.dll_memset
mov eax, esp
lea ecx, [esp + 0xa8]
mov dword [eax + 8], ecx
lea ecx, [esp + 0x138]
mov dword [eax + 4], ecx
mov dword [eax], 0x868
call sub.POWRPROF.dll_SetActivePwrScheme
sub esp, 0xc
mov ecx, esp
mov dword [ecx + 4], 0xfa9
mov dword [ecx], 0x28eea6
mov ecx, dword [sym.imp.GDI32.dll_GetNearestPaletteIndex]
mov byte [esp + 0x23], al
call ecx
sub esp, 8
mov ecx, dword [esp + 0x34]
cmp ecx, 0xa
mov dword [esp + 0x1c], eax
mov dword [esp + 0x38], ecx
jne 0x100018c1
mov eax, esp
mov dword [eax], 0xc67ab5
mov eax, dword [sym.imp.GDI32.dll_GetBkMode]
call eax
sub esp, 4
mov ecx, dword [esp + 0x64]
add ecx, 1
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0x14]
cmp eax, 0xa5
mov dword [esp + 0x84], eax
je 0x10001727
jmp 0x10001798