Function at 0x10004d00
Capabilities:
Allocate or change rwx memory
Get system information on windows
Map section object

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x10005247
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0xb8], 0
xor eax, eax
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xb0], eax
push 0xc
lea ecx, [ebp - 0xb8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.PSAPI.DLL_GetModuleInformation]
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0xc], 0
je 0x1000523d
push 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.10004ae0
add esp, 0xc
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x68], 0
xor ecx, ecx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x70], 0
xor edx, edx
mov dword [ebp - 0x6c], edx
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov dword [ebp - 8], 0
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x9c], ecx
mov edx, dword [ebp - 0x9c]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
mov dword [eax], 0
mov ecx, dword [ebp - 0x3c]
mov dword [ecx + 4], 0
mov edx, dword [ebp - 0x3c]
mov dword [edx + 8], 0
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10c]
jae 0x10004e60
push 0x1c
lea ecx, [ebp - 0xf4]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
cmp eax, 0x1c
jne 0x10004e5c
mov eax, dword [ebp - 0xf4]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0xc]
jae 0x10004e23
jmp 0x10004e4e
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 0x30]
cmp dword [ebp - 8], edx
jb 0x10004e30
jmp 0x10004e60
mov eax, dword [ebp - 0xdc]
and eax, 0x40000
jne 0x10004e3f
jmp 0x10004e4e
lea ecx, [ebp - 0xf4]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.1002eaf0
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xe8]
mov dword [ebp - 8], edx
jmp 0x10004e5e
jmp 0x10004e60
jmp 0x10004ded
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x1c]
cdq
mov ecx, 0x1c
idiv ecx
test eax, eax
jne 0x10004e77
jmp 0x1000521d
push 0x40
push 0x3000
mov edx, dword [ebp - 0x30]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x1000521d
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.10003990
test eax, eax
jne 0x10004ef5
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0xa0], edx
mov dword [ebp - 0x20], 0
jmp 0x10004ed1
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 0x30]
jge 0x10004eee
mov edx, dword [ebp - 0xa0]
add edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x20]
mov cl, byte [eax]
mov byte [edx], cl
jmp 0x10004ec8
mov dword [ebp - 0x48], 1
cmp dword [ebp - 0x48], 0
je 0x1000520c
mov dword [ebp - 4], 0
jmp 0x10004f11
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x1c]
cdq
mov ecx, 0x1c
idiv ecx
cmp dword [ebp - 4], eax
jae 0x1000520c
mov dword [ebp - 0x2c], 0
imul edx, dword [ebp - 4], 0x1c
add edx, dword [ebp - 0x1c]
mov dword [ebp - 0xac], edx
imul eax, dword [ebp - 4], 0x1c
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0xac]
mov edx, dword [edx]
add edx, dword [ecx + eax + 0xc]
cmp edx, dword [ebp - 0x4c]
ja 0x10004f59
jmp 0x100051b1
imul eax, dword [ebp - 4], 0x1c
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x74]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jl 0x10005207
imul ecx, dword [ebp - 4], 0x1c
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x78], ecx
push 0x1c
lea edx, [ebp - 0xd8]
push edx
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
cmp eax, 0x1c
jne 0x10004fe7
imul edx, dword [ebp - 4], 0x1c
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xcc]
cmp ecx, dword [eax + edx + 0xc]
je 0x10004fe7
imul edx, dword [ebp - 4], 0x1c
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xd8]
mov dword [eax + edx], ecx
imul edx, dword [ebp - 4], 0x1c
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xcc]
mov dword [eax + edx + 0xc], ecx
mov edx, dword [ebp - 0xd8]
add edx, dword [ebp - 0xcc]
mov dword [ebp - 0x4c], edx
imul eax, dword [ebp - 4], 0x1c
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + eax + 0xc]
xor eax, eax
mov dword [ebp - 0x68], edx
mov dword [ebp - 0x64], eax
push 0
push 0x8000000
push 0x40
lea ecx, [ebp - 0x68]
push ecx
push 0
push 0xf001f
lea edx, [ebp - 0x2c]
push edx
call dword [sym.imp.ntdll.dll_NtCreateSection]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jl 0x10005207
mov dword [ebp - 0x50], 0
mov dword [ebp - 0xa8], 0
xor eax, eax
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0xa8]
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0xa4]
mov dword [ebp - 0x6c], edx
imul eax, dword [ebp - 4], 0x1c
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x7c], eax
imul ecx, dword [ebp - 4], 0x1c
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x80], ecx
push 0x40
push 0
push 2
lea edx, [ebp - 0x50]
push edx
lea eax, [ebp - 0x70]
push eax
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx + 0xc]
push edx
push 0
mov eax, dword [ebp - 0x80]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jl 0x100051f7
imul eax, dword [ebp - 4], 0x1c
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x84], eax
imul ecx, dword [ebp - 4], 0x1c
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x88], ecx
imul edx, dword [ebp - 4], 0x1c
add edx, dword [ebp - 0x1c]
mov dword [ebp - 0x8c], edx
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x88]
mov eax, dword [edx]
sub eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x8c]
mov edx, dword [ecx]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x60], 0
cmp dword [ebp - 0x40], 0
jle 0x100051ab
mov eax, dword [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
call fcn.10003a80
test eax, eax
jne 0x100051ab
mov dword [ebp - 0x10], 0
jmp 0x10005121
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x40]
jge 0x100051a4
mov ecx, dword [ebp - 0x44]
add ecx, dword [ebp - 0x10]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x58], 0
push 1
mov edx, dword [ebp - 0x54]
push edx
call fcn.10003990
test eax, eax
jne 0x1000517e
lea eax, [ebp - 0x58]
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x28], 0
jmp 0x10005163
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x28], 1
jge 0x1000517e
mov edx, dword [ebp - 0x90]
add edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x54]
add eax, dword [ebp - 0x28]
mov cl, byte [eax]
mov byte [edx], cl
jmp 0x1000515a
movzx edx, byte [ebp - 0x58]
mov eax, dword [ebp - 0x5c]
add eax, dword [ebp - 0x10]
movzx ecx, byte [eax]
cmp edx, ecx
je 0x1000519f
mov edx, dword [ebp - 0x44]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x5c]
add eax, dword [ebp - 0x10]
mov cl, byte [eax]
mov byte [edx], cl
jmp 0x10005118
mov dword [ebp - 0x60], 1
cmp dword [ebp - 0x60], 0
je 0x100051f7
imul edx, dword [ebp - 4], 0x1c
add edx, dword [ebp - 0x1c]
mov dword [ebp - 0x94], edx
imul eax, dword [ebp - 4], 0x1c
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x98], eax
lea ecx, [ebp - 0xbc]
push ecx
mov edx, dword [ebp - 0x94]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 0x98]
mov edx, dword [ecx + 0xc]
push edx
imul eax, dword [ebp - 4], 0x1c
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [ebp - 0x2c], 0
je 0x10005207
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10004f08
push 0x8000
push 0
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.10004ae0
add esp, 0xc
lea ecx, [ebp - 0x1c]
call fcn.1002fce0
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esp, ebp
pop ebp
ret