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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, ecx
mov eax, 0x5a4d
push ebx
mov dword [ebp - 4], edx
cmp word [edx], ax
je 0x526703
mov eax, 0xc000012f
lfence
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edx + 0x3c]
test eax, eax
je 0x52692f
cmp eax, 0x7fffffff
jae 0x52692f
cmp dword [eax + edx], 0x4550
lea ebx, [eax + edx]
mov dword [ebp - 0x1c], ebx
jne 0x52692f
mov eax, dword [ebx + 0xa0]
test eax, eax
je 0x526922
cmp dword [ebx + 0xa4], 0
je 0x526922
add eax, edx
mov dword [ebp - 0xc], 0
test byte [ebx + 0x16], 1
mov dword [ebp - 8], eax
je 0x526761
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
xor ecx, ecx
xor esi, esi
push edi
cmp cx, word [ebx + 6]
jae 0x5267c1
xor edi, edi
nop
movzx ecx, word ds:[ebx + 0x14]
add ecx, edi
mov dword [ebp - 0xc], 0
mov eax, dword [ecx + ebx + 0x24]
add eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + ebx + 0x28]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
mov ecx, eax
mov dword [ebp - 0xc], ecx
test ecx, ecx
js 0x526826
movzx eax, word [ebx + 6]
inc esi
mov edx, dword [ebp - 4]
add edi, 0x28
cmp esi, eax
jb 0x526770
mov eax, dword [ebp - 8]
lfence
mov ecx, dword [ebx + 0xa4]
mov edi, edx
sub edi, dword [ebx + 0x34]
add ecx, eax
mov dword [ebp - 0x18], ecx
cmp eax, ecx
jae 0x52686c
lea esp, [esp]
mov ebx, dword [eax + 4]
lea ecx, [eax + 4]
mov esi, dword [eax]
sub ebx, 8
add esi, edx
mov dword [ebp - 0x10], ecx
lea ecx, [eax + 8]
xor edx, edx
shr ebx, 1
mov dword [ebp - 0x14], ecx
je 0x526850
lea esp, [esp]
movzx eax, word [ecx + edx*2]
mov ecx, eax
shr ecx, 0xc
sub ecx, 2
je 0x52683c
sub ecx, 1
je 0x526832
sub ecx, 7
jne 0x526845
and eax, 0xfff
add dword [eax + esi], edi
adc dword [eax + esi + 4], ecx
jmp 0x526845
pop edi
pop esi
lfence
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret
and eax, 0xfff
add dword [eax + esi], edi
jmp 0x526845
and eax, 0xfff
add word [eax + esi], di
mov ecx, dword [ebp - 0x14]
inc edx
cmp edx, ebx
jb 0x526800
mov eax, dword [ebp - 8]
mov ecx, dword ds:[ebp - 0x10]
mov edx, dword [ebp - 4]
add eax, dword [ecx]
mov dword [ebp - 8], eax
cmp eax, dword [ebp - 0x18]
jb 0x5267e0
mov ebx, dword [ebp - 0x1c]
xor eax, eax
xor esi, esi
cmp ax, word [ebx + 6]
jae 0x526918
xor edi, edi
lea esp, [esp]
movzx ecx, word [ebx + 0x14]
add ecx, edi
mov dword [ebp - 0x1c], 0
mov eax, dword [ecx + ebx + 0x24]
add eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + ebx + 0x28]
mov dword [ebp - 0x18], eax
mov eax, 8
mov ecx, dword [ecx + ebx + 0x3c]
mov edx, ecx
shr edx, 0x1d
and edx, 2
test ecx, ecx
cmovs edx, eax
test ecx, 0x20000000
mov eax, 0x10
cmovne edx, eax
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
mov eax, 0x20
cmove edx, eax
and ecx, 0xa0000000
cmp ecx, 0xa0000000
mov eax, 0x40
cmove edx, eax
lea eax, [ebp - 0x1c]
push eax
push edx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
mov dword [ebp - 0xc], eax
test eax, eax
js 0x526918
movzx eax, word [ebx + 6]
inc esi
mov edx, dword [ebp - 4]
add edi, 0x28
cmp esi, eax
jb 0x526880
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lfence
mov eax, 0xc0000020
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xc000007b
lfence
pop ebx
mov esp, ebp
pop ebp
ret