Function at 0x13f144d
Capabilities:
Allocate or change rwx memory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x458
push edi
mov eax, dword [0x13f4eb4]
add eax, 0x13f4e60
mov dword [ebp - 0x24], eax
mov eax, dword [0x13f4eb8]
mov dword [ebp - 0x28], eax
mov eax, dword [0x13f4ebc]
mov dword [ebp - 0x2c], eax
push 0x40
push 0x3000
push dword [ebp - 0x2c]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x14], eax
cmp dword [0x13f4eac], 1
jne 0x13f14fe
mov byte [ebp - 0x458], 0
push 0x207
push 0
lea eax, [ebp - 0x457]
push eax
call fcn.013ea4a6
add esp, 0xc
push 0x208
lea eax, [ebp - 0x458]
push eax
call fcn.013f1b17
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x13ea264
lea eax, [ebp - 0x458]
push eax
call fcn.013f4330
pop ecx
pop ecx
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x458]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x13f4e50], eax
mov byte [ebp - 0x44], 0
xor eax, eax
lea edi, [ebp - 0x43]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
and dword [ebp - 8], 0
jmp 0x13f1518
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x10
jge 0x13f1537
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 0x13f4e9c]
mov ecx, dword [ebp - 8]
inc ecx
xor eax, ecx
mov ecx, dword [ebp - 8]
mov byte [ebp + ecx - 0x44], al
jmp 0x13f1511
and dword [ebp - 0x250], 0
push 0x104
push 0
lea eax, [ebp - 0x24c]
push eax
call fcn.013ea4a6
add esp, 0xc
push 0x10
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x250]
push eax
call fcn.013f4255
add esp, 0xc
push dword [ebp - 0x28]
push dword [ebp - 0x24]
push dword [ebp - 0x24]
lea eax, [ebp - 0x250]
push eax
call fcn.013f42ab
add esp, 0x10
cmp dword [0x13f4eac], 1
jne 0x13f15e7
push 0x104
push 0
lea eax, [ebp - 0x148]
push eax
call fcn.013ea4a6
add esp, 0xc
lea eax, [ebp - 0x148]
push eax
call fcn.013f1b4f
pop ecx
push 0x13ea274
lea eax, [ebp - 0x148]
push eax
call fcn.013f4330
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.013f4420
pop ecx
push eax
lea eax, [ebp - 0x148]
push eax
push dword [0x13f4e50]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [0x13f4eb0]
push 0x13f4e94
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x24]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x14]
call fcn.013f224f
cmp dword [0x13f4eac], 1
jne 0x13f166b
push 0x104
push 0
lea eax, [ebp - 0x148]
push eax
call fcn.013ea4a6
add esp, 0xc
lea eax, [ebp - 0x148]
push eax
call fcn.013f1b4f
pop ecx
push 0x13ea28c
lea eax, [ebp - 0x148]
push eax
call fcn.013f4330
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.013f4420
pop ecx
push eax
lea eax, [ebp - 0x148]
push eax
push dword [0x13f4e50]
call dword [sym.imp.KERNEL32.dll_WriteFile]
and dword [ebp - 4], 0
jmp 0x13f1678
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp eax, dword [0x13f4ec0]
je 0x13f16eb
imul eax, dword [ebp - 4], 0xc
mov eax, dword [eax + 0x13f4ec4]
add eax, 0x13f4e60
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
push 0x40
imul eax, dword [ebp - 4], 0xc
push dword [eax + 0x13f4ec8]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
imul eax, dword [ebp - 4], 0xc
push dword [eax + 0x13f4ec8]
imul eax, dword [ebp - 4], 0xc
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax + 0x13f4ecc]
push ecx
push dword [ebp - 0x1c]
call fcn.013ea45c
add esp, 0xc
push 0
push dword [ebp - 0x20]
imul eax, dword [ebp - 4], 0xc
push dword [eax + 0x13f4ec8]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x13f1671
push dword [0x13f4e84]
mov eax, dword [0x13f4e80]
add eax, 0x13f4e60
push eax
mov eax, dword [0x13f4e70]
add eax, 0x13f4e60
push eax
call fcn.013f1944
add esp, 0xc
cmp dword [0x13f4eac], 1
jne 0x13f1775
push 0x104
push 0
lea eax, [ebp - 0x148]
push eax
call fcn.013ea4a6
add esp, 0xc
lea eax, [ebp - 0x148]
push eax
call fcn.013f1b4f
pop ecx
push 0x13ea2a4
lea eax, [ebp - 0x148]
push eax
call fcn.013f4330
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.013f4420
pop ecx
push eax
lea eax, [ebp - 0x148]
push eax
push dword [0x13f4e50]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, 0x13f4e60
sub eax, dword [0x13f4e68]
push eax
push dword [0x13f4e7c]
mov eax, dword [ebp - 0x14]
add eax, dword [0x13f4e78]
push eax
mov eax, dword [0x13f4e70]
add eax, 0x13f4e60
push eax
call fcn.013f1ba7
add esp, 0x10
cmp dword [0x13f4eac], 1
jne 0x13f180a
push 0x104
push 0
lea eax, [ebp - 0x148]
push eax
call fcn.013ea4a6
add esp, 0xc
lea eax, [ebp - 0x148]
push eax
call fcn.013f1b4f
pop ecx
push 0x13ea2b4
lea eax, [ebp - 0x148]
push eax
call fcn.013f4330
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.013f4420
pop ecx
push eax
lea eax, [ebp - 0x148]
push eax
push dword [0x13f4e50]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x8000
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
cmp dword [0x13f4eac], 1
jne 0x13f188c
push 0x104
push 0
lea eax, [ebp - 0x148]
push eax
call fcn.013ea4a6
add esp, 0xc
lea eax, [ebp - 0x148]
push eax
call fcn.013f1b4f
pop ecx
push 0x13ea2c8
lea eax, [ebp - 0x148]
push eax
call fcn.013f4330
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.013f4420
pop ecx
push eax
lea eax, [ebp - 0x148]
push eax
push dword [0x13f4e50]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [0x13f4e50]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x13f4e8c], 0
je 0x13f193d
cmp dword [0x13f4e90], 0
je 0x13f193d
and dword [ebp - 0xc], 0
and dword [ebp - 0x30], 0
mov eax, dword [0x13f4e88]
add eax, 0x13f4e60
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 0x40
push 8
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0x18]
mov ecx, dword [0x13f4e8c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [0x13f4e90]
mov dword [eax + 4], ecx
push 0
push dword [ebp - 0x20]
push 8
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x13ea2dc
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x13f1915
push 0x13ea2dc
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x13f192c
push 0x13ea2e8
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x30], eax
mov eax, dword [0x13f4e70]
add eax, 0x13f4e60
push eax
call fcn.013ea630
pop ecx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret