Function at 0x406560
Capabilities:
Access pe header
Access peb ldr_data
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x437040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x433db4
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
push edi
mov dword [ebp - 0x24], edi
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov dword [ebp - 0x28], eax
xorps xmm0, xmm0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x38], 0x10
mov dword [ebp - 0x3c], eax
mov edx, 0x433dac
mov eax, dword fs:[0x18]
mov ecx, dword [0x438ce4]
movups xmmword [ebp - 0x14], xmm0
mov dword [ebp - 0x2c], edx
mov edx, 6
mov eax, dword [eax + 0x30]
mov esi, dword [ecx + 8]
movq qword [ebp - 0x34], xmm0
mov byte [ebp - 0x18], 0x20
mov eax, dword [eax + 0xc]
add eax, 0x14
mov dword [ebp - 0x20], eax
mov eax, dword [eax]
cmp edx, esi
jne 0x4065ec
mov edx, dword [ecx + 0xc]
cmp edx, 3
je 0x4065f4
mov dword [ebp - 0x1c], 3
cmp dword [ebp - 0x1c], edx
sbb edx, edx
neg edx
test edx, edx
je 0x4065fe
mov edx, str..mrdata
mov dword [ebp - 0x2c], edx
jmp 0x40663e
cmp esi, 6
jne 0x406614
mov edx, dword [ecx + 0xc]
cmp edx, 2
je 0x40663e
mov esi, 2
cmp esi, edx
jmp 0x40661b
mov edx, 6
cmp edx, esi
mov ecx, dword [ebp - 0x18]
sbb edx, edx
movzx ecx, cl
neg edx
mov dword [ebp - 0x18], ecx
test edx, edx
mov edx, dword [ebp - 0x18]
mov ecx, 0xc
cmove edx, ecx
mov ecx, dword [0x438ce4]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x20]
cmp eax, edx
je 0x4066ff
nop dword [eax]
lea edi, [eax]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 8]
cmp eax, 6
jne 0x40666e
mov eax, dword [ecx + 0xc]
cmp eax, 2
je 0x40667d
mov esi, 2
jmp 0x406673
mov esi, 6
cmp esi, eax
sbb eax, eax
neg eax
test eax, eax
je 0x406686
mov eax, dword [edi + 0x48]
cmp dword [eax + 0x20], 0xfffffffe
jmp 0x40668a
cmp dword [edi + 0x10], 0
sete al
test al, al
jne 0x4066f1
mov esi, dword [edi + 0x10]
test esi, esi
je 0x40679e
push esi
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
test eax, eax
je 0x406795
mov ecx, dword [esi + 0x3c]
movzx eax, word [ecx + esi + 6]
lea eax, [eax + eax*4]
lea eax, [ecx + eax*8]
cmp dword [eax + esi + 0xf8], 0x11ffee00
jne 0x406795
cmp dword [eax + esi + 0xfc], 0xaabbcc
jne 0x406795
cmp dword [eax + esi + 0x108], esi
jne 0x406795
mov ecx, dword [0x438ce4]
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
cmp eax, edx
jne 0x406650
push ebx
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov esi, eax
test ebx, ebx
je 0x406807
test esi, esi
je 0x406807
test edi, edi
je 0x406807
cmp dword [ebp - 0x28], 0
je 0x406807
lea eax, [ebp - 0x1c]
mov ecx, ebx
push eax
lea edx, [ebp - 0x28]
call fcn.00405420
push dword [ebp - 0x28]
call dword [sym.imp.ntdll.dll_RtlEncodeSystemPointer]
mov ecx, dword [esi + 0x50]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp - 0x2c]
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov ecx, edi
push eax
call fcn.00404fd0
test eax, eax
js 0x406807
mov eax, dword [ebp - 0x18]
movzx esi, al
mov ecx, dword [0x438ce4]
mov eax, dword [ebp - 0x34]
sub eax, esi
mov edx, dword [ecx + 8]
cmp edx, 6
jne 0x4067c5
mov ecx, dword [ecx + 0xc]
cmp ecx, 2
je 0x4067d4
mov edx, 2
cmp edx, ecx
jmp 0x4067cc
mov ecx, dword [0x438ce4]
mov edx, dword [ebp - 0x20]
mov eax, dword [edi + 0x10]
mov edi, dword [ebp - 0x24]
cmp eax, edi
jne 0x4067b2
cmp byte [ebp - 0x18], 0x20
je 0x4066f4
test ebx, ebx
je 0x4067be
cmp ebx, eax
jb 0x4066f4
mov ebx, eax
jmp 0x4066f4
mov ecx, 6
cmp ecx, edx
sbb ecx, ecx
neg ecx
test ecx, ecx
je 0x4067e3
cmp dword [eax + 4], 0x200
jne 0x4067f2
cmp dword [eax + 0xc], 0
je 0x406809
cmp dword [eax + 4], 0x200
jne 0x4067f2
cmp dword [eax + 8], 0
je 0x406809
lea eax, [ebp - 0x3c]
mov edx, ebx
push eax
mov ecx, edi
call fcn.00404fd0
test eax, eax
jns 0x406771
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040c1c5
mov esp, ebp
pop ebp
ret