Function at 0x46aea7
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Get system information on windows
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
cmp dword [ebp + 8], 0
jne 0x46aec0
mov eax, 1
jmp 0x46b497
mov eax, dword [ebp + 8]
mov dword [ebp - 0x70], eax
push 0x40
mov ecx, dword [ebp - 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x46aee6
mov edx, dword [ebp - 0x70]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x5a4d
je 0x46aef0
mov eax, 2
jmp 0x46b497
mov ecx, dword [ebp - 0x70]
mov edx, dword [ebp - 0x70]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x6c], edx
push 0xf8
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x46af1b
mov ecx, dword [ebp - 0x6c]
cmp dword [ecx], 0x4550
je 0x46af25
mov eax, 3
jmp 0x46b497
mov edx, dword [ebp - 0x6c]
xor eax, eax
mov ax, word [edx + 0x14]
cmp eax, 0xe0
jne 0x46af46
mov ecx, dword [ebp - 0x6c]
xor edx, edx
mov dx, word [ecx + 0x18]
cmp edx, 0x10b
je 0x46af50
mov eax, 4
jmp 0x46b497
mov eax, dword [ebp - 0x6c]
xor ecx, ecx
mov cx, word [eax + 6]
cmp ecx, 1
jge 0x46af68
mov eax, 5
jmp 0x46b497
mov edx, dword [ebp - 0x6c]
xor eax, eax
mov ax, word [edx + 0x14]
mov ecx, dword [ebp - 0x6c]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0xc], 0x28
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x6c]
xor edx, edx
mov dx, word [ecx + 6]
mov ecx, dword [ebp - 0xc]
imul ecx, edx
add eax, ecx
mov dword [ebp - 0x74], eax
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x14], 0
mov word [ebp - 0x5c], 0
jmp 0x46afbd
mov ax, word [ebp - 0x5c]
add ax, 1
mov word [ebp - 0x5c], ax
mov ecx, dword [ebp - 0x5c]
and ecx, 0xffff
mov edx, dword [ebp - 0x6c]
xor eax, eax
mov ax, word [edx + 6]
cmp ecx, eax
jae 0x46b059
mov ecx, dword [ebp - 0x5c]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x5c]
and edx, 0xffff
imul edx, edx, 0x28
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + ecx + 0xc]
mov eax, dword [ebp - 0x18]
add ecx, dword [eax + edx + 0x10]
cmp dword [ebp - 0x54], ecx
jae 0x46b02b
mov ecx, dword [ebp - 0x5c]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x5c]
and edx, 0xffff
imul edx, edx, 0x28
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + ecx + 0xc]
mov eax, dword [ebp - 0x18]
add ecx, dword [eax + edx + 0x10]
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp - 0x5c]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x18]
mov edx, dword [edx + 0x88]
cmp edx, dword [eax + ecx + 0xc]
jne 0x46b054
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
mov dword [ebp - 0x14], eax
jmp 0x46afb1
lea ecx, [ebp - 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x54]
xor edx, edx
div dword [ebp - 0x4c]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x54]
xor edx, edx
div dword [ebp - 0x4c]
test edx, edx
je 0x46b083
mov edx, dword [ebp - 0x58]
add edx, 1
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
imul eax, dword [ebp - 0x4c]
mov dword [ebp - 0x64], eax
push 0x40
push 0x1000
mov ecx, dword [ebp - 0x64]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x46b0b3
mov eax, 6
jmp 0x46b497
mov edx, dword [ebp - 0x74]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCRT.dll_memmove
add esp, 0xc
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0
mov word [ebp - 0x5c], 0
jmp 0x46b0f0
mov dx, word [ebp - 0x5c]
add dx, 1
mov word [ebp - 0x5c], dx
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
mov ecx, dword [ebp - 0x6c]
xor edx, edx
mov dx, word [ecx + 6]
cmp eax, edx
jge 0x46b160
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + eax + 0xc]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 8]
add edx, dword [ecx + eax + 0x14]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + eax + 0x10]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x68]
push edx
call sub.MSVCRT.dll_memmove
add esp, 0xc
jmp 0x46b0e4
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x70]
mov edx, dword [ebp - 0x70]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x6c], edx
mov eax, dword [ebp - 0x6c]
add eax, 0xf8
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x70]
mov dword [0x49fe04], ecx
cmp dword [ebp - 0x14], 0
je 0x46b1d0
call fcn.0046a036
cmp eax, 1
jne 0x46b1d0
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + edx + 0xc]
add ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x18]
mov dword [eax + edx + 0xc], ecx
mov ecx, dword [ebp - 0x14]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + ecx + 0x14]
add eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x18]
mov dword [edx + ecx + 0x14], eax
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax + 0x80]
mov dword [ebp - 0x7c], ecx
cmp dword [ebp - 0x7c], 0
jne 0x46b1fd
push 0x8000
push 0
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 7
jmp 0x46b497
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax + 0x80]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x46b21a
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x70]
mov dword [ebp - 8], edx
jmp 0x46b235
push 0x8000
push 0
mov eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 8
jmp 0x46b497
mov ecx, 1
test ecx, ecx
je 0x46b381
mov edx, dword [ebp - 8]
cmp dword [edx + 4], 0
jne 0x46b259
mov eax, dword [ebp - 8]
cmp dword [eax + 0xc], 0
jne 0x46b259
jmp 0x46b381
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xc]
add edx, dword [0x49fe04]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x46b288
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x46b293
jmp 0x46b492
mov edx, dword [ebp - 8]
cmp dword [edx], 0
je 0x46b2ab
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x70]
mov dword [ebp - 0x84], ecx
jmp 0x46b2ba
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x10]
add eax, dword [ebp - 0x70]
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x10]
add edx, dword [ebp - 0x70]
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x84]
cmp dword [eax], 0
je 0x46b373
mov dword [ebp - 0x88], 0x80000000
mov ecx, dword [ebp - 0x84]
mov edx, dword [ecx]
and edx, dword [ebp - 0x88]
test edx, edx
je 0x46b311
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x80]
mov dword [ecx], eax
jmp 0x46b335
mov edx, dword [ebp - 0x84]
mov eax, dword [edx]
add eax, dword [ebp - 0x70]
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x60]
add ecx, 2
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x80]
mov dword [ecx], eax
cmp dword [ebp - 0x80], 0
jne 0x46b356
push 0x8000
push 0
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xa
jmp 0x46b497
mov eax, dword [ebp - 0x80]
add eax, 4
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x84]
add ecx, 4
mov dword [ebp - 0x84], ecx
jmp 0x46b2c6
mov edx, dword [ebp - 8]
add edx, 0x14
mov dword [ebp - 8], edx
jmp 0x46b235
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax + 0xa0]
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 0
je 0x46b45f
mov edx, dword [ebp - 0x2c]
add edx, dword [ebp - 0x70]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 0
je 0x46b45f
mov ecx, dword [ebp - 0x2c]
add ecx, 8
mov dword [ebp - 0x8c], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
add eax, dword [edx + 4]
cmp dword [ebp - 0x8c], eax
jae 0x46b44e
mov ecx, dword [ebp - 0x8c]
xor edx, edx
mov dx, word [ecx]
and edx, 0xf000
mov dword [ebp - 0x78], edx
cmp dword [ebp - 0x78], 0x3000
jne 0x46b41c
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x70]
add ecx, dword [eax]
mov edx, dword [ebp - 0x8c]
xor eax, eax
mov ax, word [edx]
and eax, 0xfff
add ecx, eax
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x70]
add edx, dword [ecx]
mov eax, dword [ebp - 0x6c]
sub edx, dword [eax + 0x34]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx], edx
jmp 0x46b43a
cmp dword [ebp - 0x78], 0
je 0x46b43a
push 0x8000
push 0
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xa
jmp 0x46b497
mov eax, dword [ebp - 0x8c]
add eax, 2
mov dword [ebp - 0x8c], eax
jmp 0x46b3b8
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x2c]
add edx, dword [ecx + 4]
mov dword [ebp - 0x2c], edx
jmp 0x46b3a0
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax + 0x28]
add ecx, dword [ebp - 0x70]
mov dword [0x49fdf0], ecx
mov dword [ebp - 0x10], 0
mov edx, dword [ebp - 0x10]
push edx
push 1
mov eax, dword [ebp - 0x70]
push eax
call dword [0x49fdf0]
mov ecx, dword [ebp + 0xc]
mov dword [0x49fdfc], ecx
xor eax, eax
jmp 0x46b497
jmp 0x46b373
mov esp, ebp
pop ebp
ret