Function at 0x646c3dd0
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xbc
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x5c], ecx
mov word [ebp - 0x6a], dx
cmp edx, 2
je 0x646c42ec
mov dword [ebp - 0x64], 0x1c
mov ecx, 0x48
cmp dx, 2
je 0x646c4311
cmp dx, 0x17
mov eax, 0
mov edx, 0x646d2618
cmovne edx, eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], eax
lea eax, [ebp - 0x38]
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], 1
call sub.nsi.dll_NsiAllocateAndGetTable
mov dword [ebp - 0x80], eax
sub esp, 0x34
test eax, eax
jne 0x646c4119
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x50]
mov edi, ecx
test eax, eax
je 0x646c40f6
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x4c], ecx
and eax, 0x80
mov dword [ebp - 0x60], eax
lea esi, [esi]
nop
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 0xa4]
test eax, eax
je 0x646c42dc
lea esi, [esi]
mov edx, eax
mov eax, dword [eax + 8]
test eax, eax
jne 0x646c3ec8
lea eax, [edx + 8]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 0x8c]
test eax, eax
je 0x646c42cc
lea esi, [esi]
nop
mov edx, eax
mov eax, dword [eax + 8]
test eax, eax
jne 0x646c3ef0
lea eax, [edx + 8]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x646c40e3
mov eax, dword fs:[0x18]
mov dword [ebp - 0x58], ecx
xor edi, edi
mov dword [ebp - 0x78], eax
jmp 0x646c3f42
test byte [ebp - 0x5c], 0x10
jne 0x646c4090
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x58], eax
add edi, 1
cmp dword [ebp - 0x3c], edi
jbe 0x646c40e0
lea eax, [edi + edi*2]
mov ecx, dword [ebp - 0x50]
mov ebx, eax
shl ebx, 4
add ebx, dword [ebp - 0x4c]
cmp dword [ebp - 0x54], 2
lea esi, [ebx + eax*8]
lea eax, [ebx + 0x18]
lea edx, [esi + 0x28]
cmovne eax, edx
mov edx, dword [eax]
mov eax, dword [eax + 4]
xor edx, dword [ecx + 0xb0]
xor eax, dword [ecx + 0xb4]
or eax, edx
jne 0x646c3f36
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x646c3f20
lea eax, [ebp - 0x34]
xor edx, edx
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
xor eax, eax
mov dword [ecx + eax], edx
add eax, 4
cmp eax, 0x1c
jb 0x646c3f89
cmp dword [ebp - 0x54], 2
mov dword [ebp - 0x58], ecx
je 0x646c41e8
mov eax, dword [0x646d2068]
lea edx, [esi + 0x38]
cmp dword [esi + 0x38], eax
je 0x646c4128
mov eax, dword [esi + 0x38]
movzx ecx, word [ebp - 0x6a]
mov dword [ebp - 0x2c], eax
mov eax, dword [esi + 0x3c]
mov word [ebp - 0x34], cx
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x40]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x44]
mov dword [ebp - 0x20], eax
test cx, cx
je 0x646c4158
mov ecx, dword [ebp - 0x64]
mov dword [esp + 4], 8
mov eax, dword fs:[0x18]
lea edx, [ecx + 0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x4c], eax
sub esp, 0xc
test eax, eax
je 0x646c4302
mov eax, dword [ebp - 0x4c]
lea edx, [eax + 0x18]
mov dword [eax], 0x18
mov ecx, eax
mov dword [ebp - 0x68], edx
mov dword [eax + 0xc], edx
mov edx, dword [ebp - 0x64]
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x34]
mov dword [ecx + 0x18], eax
mov edx, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x68]
mov eax, dword [ebp + edx - 0x38]
mov dword [ecx + edx - 4], eax
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x7c], esi
lea eax, [edx + 0x1c]
mov edx, ecx
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x58], ebx
and eax, 0xfffffffc
sub edx, eax
mov dword [ebp - 0x68], eax
xor eax, eax
sub ecx, edx
add edx, dword [ebp - 0x64]
and edx, 0xfffffffc
mov esi, dword [ecx + eax]
mov ebx, dword [ebp - 0x68]
mov dword [ebx + eax], esi
add eax, 4
cmp eax, edx
jb 0x646c4061
mov ecx, dword [ebp - 0x70]
mov eax, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x7c]
mov dword [ecx], eax
add eax, 8
mov dword [ebp - 0x70], eax
test byte [ebp - 0x5c], 0x10
je 0x646c3f2a
nop
lea eax, [ebp - 0x34]
xor edx, edx
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
xor eax, eax
mov dword [ecx + eax], edx
add eax, 4
cmp eax, 0x1c
jb 0x646c409d
cmp dword [ebp - 0x54], 2
mov dword [ebp - 0x58], ecx
lea edx, [esi + 0x38]
je 0x646c41fd
mov eax, dword [0x646d2058]
cmp dword [edx], eax
je 0x646c4188
mov eax, dword [ebp - 0x38]
add edi, 1
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x3c], edi
ja 0x646c3f42
lea esi, [esi]
mov ecx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 8]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x646c3eb0
mov edi, ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call sub.nsi.dll_NsiFreeTable
sub esp, 0x10
mov eax, dword [ebp - 0x80]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x646d206c]
cmp dword [edx + 4], eax
jne 0x646c3fb2
mov eax, dword [0x646d2070]
cmp dword [edx + 8], eax
jne 0x646c3fb2
mov eax, dword [0x646d2074]
cmp dword [edx + 0xc], eax
jne 0x646c3fb2
lea esi, [esi]
test byte [ebp - 0x5c], 0x10
je 0x646c3f30
mov ecx, dword [ebp - 0x58]
xor ebx, ebx
xor eax, eax
mov dword [ecx + eax], ebx
add eax, 4
cmp eax, 0x1c
jb 0x646c4169
mov dword [ebp - 0x58], ecx
mov eax, dword [0x646d2058]
cmp dword [edx], eax
jne 0x646c40c5
lea esi, [esi]
mov eax, dword [0x646d205c]
cmp dword [edx + 4], eax
jne 0x646c40c5
mov eax, dword [0x646d2060]
cmp dword [edx + 8], eax
jne 0x646c40c5
mov eax, dword [0x646d2064]
cmp dword [edx + 0xc], eax
jne 0x646c40c5
mov eax, dword [esi + 4]
movzx ebx, word [ebp - 0x6a]
mov dword [ebp - 0x2c], eax
mov eax, dword [esi + 8]
mov word [ebp - 0x34], bx
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x20], eax
movzx eax, byte [esi + 0x14]
mov dword [ebp - 0x68], eax
test bx, bx
jne 0x646c421e
jmp 0x646c40c5
mov eax, dword [ebx + 0x28]
test eax, eax
jne 0x646c42b8
test byte [ebp - 0x5c], 0x10
je 0x646c3f30
mov edx, dword [ebx + 0x28]
test edx, edx
jne 0x646c40c5
mov eax, 2
mov word [ebp - 0x34], ax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x30], eax
movzx eax, byte [ebx + 8]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x64]
mov dword [esp + 4], 8
add eax, 0x18
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x78]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x646c4302
mov esi, dword [ebp - 0x64]
lea edx, [eax + 0x18]
mov dword [eax], 0x18
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], esi
mov eax, dword [ebp - 0x58]
mov eax, dword [eax]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x58]
mov eax, dword [eax + esi - 4]
mov dword [ebp - 0x64], esi
mov dword [ebx + esi + 0x14], eax
lea esi, [ebx + 0x1c]
mov ecx, dword [ebp - 0x58]
xor eax, eax
and esi, 0xfffffffc
mov dword [ebp - 0x4c], ebx
sub edx, esi
sub ecx, edx
add edx, dword [ebp - 0x64]
and edx, 0xfffffffc
mov ebx, dword [ecx + eax]
mov dword [esi + eax], ebx
add eax, 4
cmp eax, edx
jb 0x646c428f
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x68]
mov dword [ebx + 0x14], eax
mov eax, dword [ebp - 0x74]
mov dword [eax], ebx
lea eax, [ebx + 8]
mov dword [ebp - 0x74], eax
jmp 0x646c40c5
mov eax, dword [ebx + 0x28]
mov ecx, 2
mov word [ebp - 0x34], cx
mov dword [ebp - 0x30], eax
jmp 0x646c3fdb
mov eax, dword [ebp - 0x50]
add eax, 0x8c
mov dword [ebp - 0x74], eax
jmp 0x646c3eff
mov eax, dword [ebp - 0x50]
add eax, 0xa4
mov dword [ebp - 0x70], eax
jmp 0x646c3ed7
mov dword [ebp - 0x64], 0x10
mov ecx, 0x30
mov edx, 0x646d2630
jmp 0x646c3e19
mov dword [ebp - 0x80], 8
mov edi, dword [ebp - 0x38]
jmp 0x646c40f6
mov edx, 0x646d2630
jmp 0x646c3e19