Function at 0x470d20
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push edi
mov edi, ecx
mov dword [ebp - 0x1c], 0
xorps xmm0, xmm0
movq qword [ebp - 0x24], xmm0
test edi, edi
je 0x471002
push 0xc
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.PSAPI.DLL_GetModuleInformation]
test eax, eax
je 0x471002
mov edx, dword [ebp - 0x20]
mov eax, 0x5a4d
mov dword [ebp - 8], edx
cmp word [edi], ax
jne 0x471002
mov ecx, dword [edi + 0x3c]
lea eax, [ecx + 0xf8]
cmp eax, edx
jae 0x471002
cmp dword [ecx + edi], 0x4550
push ebx
lea ebx, [ecx + edi]
jne 0x471001
movzx eax, word [ebx + 4]
mov ecx, 0x14c
mov dword [ebp - 0xc], 0
push esi
cmp cx, ax
jne 0x470db1
mov dword [ebp - 4], 0
jmp 0x470de5
mov ecx, 0x200
mov esi, 0xaa64
cmp cx, ax
je 0x470dd3
mov ecx, 0x8664
cmp cx, ax
je 0x470dd3
cmp si, ax
jne 0x471000
xor ecx, ecx
mov dword [ebp - 4], 1
cmp si, ax
sete cl
mov dword [ebp - 0xc], ecx
mov esi, dword [ebx + 0x28]
add esi, edi
mov dword [ebp - 0x18], esi
je 0x471000
cmp esi, edi
jbe 0x471000
lea eax, [edx + edi]
mov dword [ebp - 0x14], eax
cmp esi, eax
jae 0x471000
push 0x1c
lea eax, [ebp - 0x40]
mov dword [ebp - 0x28], 0
xorps xmm0, xmm0
push eax
push esi
movups xmmword [ebp - 0x40], xmm0
movq qword [ebp - 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x471000
test dword [ebp - 0x30], 0x1000
je 0x471000
test dword [ebp - 0x28], 0x1000000
je 0x471000
xor eax, eax
test byte [ebp - 0x2c], 0xf0
je 0x470e58
mov eax, 1
test eax, eax
je 0x471000
mov edx, dword [ebp - 4]
lea ecx, [ebx + 0xd0]
test edx, edx
jne 0x470e73
lea ecx, [ebx + 0xc0]
mov eax, dword [ecx]
test eax, eax
je 0x470f85
cmp dword [ecx + 4], 0
je 0x470f85
cmp eax, dword [ebp - 8]
jae 0x470f85
test edx, edx
jne 0x470e9a
mov ebx, dword [eax + edi + 0xc]
jmp 0x470e9e
mov ebx, dword [eax + edi + 0x18]
test ebx, ebx
je 0x470f85
cmp ebx, edi
jbe 0x470f85
mov eax, dword [ebp - 0x14]
cmp ebx, eax
jae 0x470f85
mov esi, dword [ebx]
test esi, esi
je 0x470f71
cmp esi, edi
jbe 0x470f71
cmp esi, eax
jae 0x470f71
push 0x1c
lea eax, [ebp - 0x40]
mov dword [ebp - 0x28], 0
xorps xmm0, xmm0
push eax
push esi
movups xmmword [ebp - 0x40], xmm0
movq qword [ebp - 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x470f71
test dword [ebp - 0x30], 0x1000
je 0x470f71
test dword [ebp - 0x28], 0x1000000
je 0x470f71
test byte [ebp - 0x2c], 0xf0
je 0x470f71
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x40
push 0x64
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [ebp - 0xc], 0
je 0x470f34
mov eax, dword [0x58104c]
mov dword [esi], eax
jmp 0x470f50
cmp dword [ebp - 4], 0
je 0x470f3f
mov byte [esi], 0xc3
jmp 0x470f50
mov ax, word [0x581064]
mov word [esi], ax
mov al, byte [0x581066]
mov byte [esi + 2], al
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 0x64
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [ebx + 4]
add ebx, 4
mov eax, dword [ebp - 0x14]
test esi, esi
jne 0x470ec3
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov esi, dword [ebp - 0x18]
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 0x40
push 0x14
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x471000
cmp dword [ebp - 4], 0
jne 0x470fb6
mov eax, dword [0x581058]
mov dword [esi], eax
mov al, byte [0x58105c]
mov byte [esi + 4], al
jmp 0x470fdf
cmp dword [ebp - 0xc], 0
je 0x470fce
mov eax, dword [0x581050]
mov ecx, dword [0x581054]
mov dword [esi], eax
mov dword [esi + 4], ecx
jmp 0x470fdf
mov ax, word [0x581060]
mov word [esi], ax
mov al, byte [0x581062]
mov byte [esi + 2], al
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push 0x14
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret