Function at 0x646c3e70
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 - 0x4c], edx
mov dword [ebp - 0x58], ecx
mov word [ebp - 0x6e], dx
cmp edx, 2
je 0x646c42f7
mov eax, edx
mov dword [ebp - 0x64], 0x1c
mov edx, 0x48
cmp ax, 2
je 0x646c431c
cmp ax, 0x17
mov ecx, 0
mov eax, 0x646d2658
cmovne eax, ecx
mov dword [esp + 0x10], edx
lea ecx, [ebp - 0x3c]
lea edx, [ebp - 0x38]
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], ecx
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 + 0xc], edx
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov dword [esp], 1
call sym._NsiAllocateAndGetTable_52
mov dword [ebp - 0x7c], eax
sub esp, 0x34
test eax, eax
jne 0x646c42b4
mov edi, dword [ebp - 0x50]
mov esi, dword [ebp - 0x38]
test edi, edi
je 0x646c4291
mov eax, dword [ebp - 0x58]
and eax, 0x80
mov dword [ebp - 0x5c], eax
lea esi, [esi]
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 0xa4]
test eax, eax
je 0x646c42e7
lea esi, [esi]
mov edx, eax
mov eax, dword [eax + 8]
test eax, eax
jne 0x646c3f60
lea eax, [edx + 8]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 0x8c]
test eax, eax
je 0x646c42d7
mov edx, eax
mov eax, dword [eax + 8]
test eax, eax
jne 0x646c3f80
lea eax, [edx + 8]
mov dword [ebp - 0x6c], eax
mov ebx, dword [ebp - 0x3c]
test ebx, ebx
je 0x646c4280
mov eax, dword fs:[0x18]
xor edx, edx
mov dword [ebp - 0x78], eax
jmp 0x646c3fc7
test byte [ebp - 0x58], 0x10
jne 0x646c40d8
mov esi, dword [ebp - 0x38]
inc edx
cmp dword [ebp - 0x3c], edx
jbe 0x646c4280
lea eax, [edx + edx*2]
mov ebx, eax
shl ebx, 4
cmp dword [ebp - 0x4c], 2
lea edi, [esi + ebx]
lea ebx, [edi + eax*8]
lea eax, [edi + 0x18]
mov dword [ebp - 0x54], edi
mov edi, dword [ebp - 0x50]
lea ecx, [ebx + 0x28]
cmove ecx, eax
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
xor eax, dword [edi + 0xb0]
xor ecx, dword [edi + 0xb4]
or eax, ecx
jne 0x646c3fbd
mov ecx, dword [ebp - 0x5c]
test ecx, ecx
je 0x646c3fb0
lea esi, [ebp - 0x34]
mov ecx, 7
cmp dword [ebp - 0x4c], 2
mov edi, esi
rep stosd dword es:[edi], eax
je 0x646c4230
lea eax, [ebx + 0x38]
mov dword [ebp - 0x60], eax
mov eax, dword [0x646d20a8]
cmp dword [ebx + 0x38], eax
je 0x646c41e0
mov eax, dword [ebx + 0x38]
movzx ecx, word [ebp - 0x6e]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx + 0x3c]
mov word [ebp - 0x34], cx
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 0x40]
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0x44]
mov dword [ebp - 0x20], eax
test cx, cx
je 0x646c4210
mov dword [ebp - 0x74], edx
mov edx, dword [ebp - 0x64]
mov dword [esp + 4], 8
lea ecx, [edx + 0x18]
mov dword [esp + 8], ecx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edx, dword [ebp - 0x74]
sub esp, 0xc
test eax, eax
mov dword [ebp - 0x60], eax
je 0x646c430d
mov ecx, dword [ebp - 0x60]
lea eax, [ecx + 0x18]
mov dword [ecx], 0x18
mov edi, ecx
mov dword [ecx + 0xc], eax
mov ecx, dword [ebp - 0x64]
mov dword [edi + 0x10], ecx
mov edi, ecx
mov ecx, dword [esi + ecx - 4]
mov dword [eax + edi - 4], ecx
mov ecx, edi
mov edi, eax
dec ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x60]
mov dword [eax], ecx
add ecx, 8
mov dword [ebp - 0x68], ecx
test byte [ebp - 0x58], 0x10
je 0x646c3fba
lea esi, [esi]
lea esi, [ebp - 0x34]
xor eax, eax
mov ecx, 7
cmp dword [ebp - 0x4c], 2
mov edi, esi
rep stosd dword es:[edi], eax
lea eax, [ebx + 0x38]
mov dword [ebp - 0x60], eax
je 0x646c4250
mov eax, dword [ebp - 0x60]
mov ecx, dword [0x646d2098]
cmp dword [eax], ecx
jne 0x646c3fba
mov ecx, dword [0x646d209c]
cmp dword [eax + 4], ecx
jne 0x646c3fba
mov ecx, dword [0x646d20a0]
cmp dword [eax + 8], ecx
jne 0x646c3fba
mov ecx, dword [0x646d20a4]
cmp dword [eax + 0xc], ecx
jne 0x646c3fba
mov eax, dword [ebx + 4]
movzx ecx, word [ebp - 0x6e]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx + 8]
mov word [ebp - 0x34], cx
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x20], eax
movzx eax, byte [ebx + 0x14]
mov dword [ebp - 0x60], eax
test cx, cx
je 0x646c3fba
lea esi, [esi]
mov eax, dword [ebp - 0x64]
mov dword [esp + 4], 8
mov dword [ebp - 0x54], edx
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]
mov edx, dword [ebp - 0x54]
sub esp, 0xc
test eax, eax
je 0x646c430d
mov edi, dword [ebp - 0x64]
lea ebx, [eax + 0x18]
mov dword [eax], 0x18
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], edi
mov ecx, dword [esi + edi - 4]
mov dword [eax + edi + 0x14], ecx
lea ecx, [edi - 1]
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x60]
mov dword [eax + 0x14], esi
mov esi, dword [ebp - 0x6c]
mov dword [esi], eax
add eax, 8
mov dword [ebp - 0x6c], eax
jmp 0x646c3fba
mov eax, dword [ebp - 0x60]
mov ecx, dword [0x646d20ac]
cmp dword [eax + 4], ecx
jne 0x646c402e
mov ecx, dword [0x646d20b0]
cmp dword [eax + 8], ecx
jne 0x646c402e
mov ecx, dword [0x646d20b4]
cmp dword [eax + 0xc], ecx
jne 0x646c402e
test byte [ebp - 0x58], 0x10
je 0x646c3fba
mov ecx, 7
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
jmp 0x646c40f6
mov eax, dword [ebp - 0x54]
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x646c42c0
test byte [ebp - 0x58], 0x10
je 0x646c3fba
lea esi, [esi]
nop
mov ebx, dword [ebp - 0x54]
mov ecx, dword [ebx + 0x28]
test ecx, ecx
jne 0x646c3fba
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 - 0x60], eax
jmp 0x646c4168
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 8]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x646c3f48
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._NsiFreeTable_16
sub esp, 0x10
mov eax, dword [ebp - 0x7c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x54]
mov edi, 2
mov word [ebp - 0x34], di
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x30], eax
jmp 0x646c4057
mov eax, dword [ebp - 0x50]
add eax, 0x8c
mov dword [ebp - 0x6c], eax
jmp 0x646c3f8f
mov eax, dword [ebp - 0x50]
add eax, 0xa4
mov dword [ebp - 0x68], eax
jmp 0x646c3f6f
mov dword [ebp - 0x64], 0x10
mov edx, 0x30
mov eax, 0x646d2670
jmp 0x646c3ebb
mov dword [ebp - 0x7c], 8
mov esi, dword [ebp - 0x38]
jmp 0x646c4291
mov eax, 0x646d2670
jmp 0x646c3ebb