Function at 0x10004850
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
add eax, 0x68
push esi
mov esi, edx
push ebx
sub esp, 0x2c
mov dword [ebp - 0x20], eax
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ebx, dword [edi + 0x64]
sub esp, 4
test ebx, ebx
jne 0x10004891
jmp 0x10004960
mov eax, dword [ebx + 4]
cmovns eax, dword [ebx + 8]
mov ebx, eax
test eax, eax
je 0x10004960
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [edi + 0x60]
test eax, eax
jne 0x10004880
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov dword [ebp - 0x1c], ecx
test edx, edx
je 0x100049a0
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x10004b40
lea esi, [esi]
nop
mov ecx, edx
mov edx, dword [edx + 4]
test edx, edx
jne 0x100048c0
mov esi, dword [ecx]
mov edx, dword [ecx + 8]
test esi, esi
je 0x10004d50
cmp ecx, dword [esi + 4]
je 0x10004d63
mov dword [esi + 8], edx
mov dword [ebp - 0x1c], edx
mov esi, dword [ecx]
test edx, edx
jne 0x100049c6
test byte [ecx + 0xc], 1
je 0x100049d7
mov eax, 1
cmp ebx, ecx
jne 0x100049db
lea esi, [esi]
lea esi, [esi]
mov eax, dword [edi + 0x64]
test eax, eax
je 0x1000491b
and dword [eax + 0xc], 0xfffffffe
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
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_HeapFree]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
test byte [0x1002801c], 4
je 0x1000494e
mov dword [esp + 0xc], str.cannot_find_key_in_wrapper_lookup_n
mov dword [esp + 8], str.wrapper_remove_entry
mov dword [esp + 4], 0x1002801c
mov dword [esp], 2
call fcn.10001440
jmp 0x1000494e
mov esi, dword [ebp - 0x1c]
mov edx, dword [ebx]
test esi, esi
je 0x10004dd8
mov ecx, dword [ebp - 0x1c]
test edx, edx
je 0x10004b90
cmp dword [edx + 4], ebx
je 0x10004c60
mov dword [edx + 8], ecx
mov ecx, ebx
mov esi, dword [ecx]
mov edx, dword [ebp - 0x1c]
mov dword [edx], esi
test byte [ecx + 0xc], 1
jne 0x100048f9
cmp ebx, ecx
je 0x10004a37
mov edx, dword [ebx]
mov dword [ecx], edx
mov dword [ebp - 0x24], edx
mov edx, dword [ebx + 4]
mov dword [ecx + 4], edx
mov edx, dword [ebx + 8]
mov dword [ecx + 8], edx
mov edx, dword [ebx + 0xc]
mov dword [ecx + 0xc], edx
mov edx, dword [ebp - 0x24]
test edx, edx
je 0x10004b80
mov edx, dword [ebp - 0x24]
cmp dword [edx + 4], ebx
je 0x10004c58
mov edx, dword [ebp - 0x24]
mov dword [edx + 8], ecx
mov edx, dword [ecx + 8]
test edx, edx
je 0x10004a1a
mov dword [edx], ecx
mov edx, dword [ecx + 4]
test edx, edx
je 0x10004b60
mov dword [edx], ecx
cmp esi, ebx
je 0x10004b68
test eax, eax
jne 0x10004910
test esi, esi
je 0x10004adb
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x10004a53
mov eax, dword [ebp - 0x1c]
test byte [eax + 0xc], 1
jne 0x10004af0
mov eax, dword [esi + 4]
cmp dword [ebp - 0x1c], eax
je 0x10004bf7
test eax, eax
je 0x10027937
mov edx, dword [eax + 0xc]
test dl, 1
jne 0x10004afc
mov edx, dword [eax + 4]
test edx, edx
je 0x10004ba0
test byte [edx + 0xc], 1
je 0x10004ba0
mov edx, dword [eax + 0xc]
mov ecx, dword [esi + 0xc]
and edx, 0xfffffffe
and ecx, 1
or edx, ecx
mov dword [eax + 0xc], edx
and dword [esi + 0xc], 0xfffffffe
mov eax, dword [eax + 4]
test eax, eax
je 0x10004aa8
and dword [eax + 0xc], 0xfffffffe
mov edx, dword [esi]
mov eax, dword [esi + 4]
test edx, edx
je 0x10004d80
cmp dword [edx + 4], esi
je 0x10004d88
mov dword [edx + 8], eax
mov edx, dword [eax + 8]
mov dword [esi + 4], edx
test edx, edx
je 0x10004acd
mov dword [edx], esi
mov dword [eax + 8], esi
mov edx, dword [esi]
mov dword [eax], edx
mov dword [esi], eax
jmp 0x10004910
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10004910
lea esi, [esi]
lea esi, [esi]
mov eax, dword [ebp - 0x1c]
and dword [eax + 0xc], 0xfffffffe
jmp 0x10004910
and edx, 0xfffffffe
mov dword [eax + 0xc], edx
mov edx, dword [esi]
or dword [esi + 0xc], 1
mov eax, dword [esi + 4]
test edx, edx
je 0x10004d98
cmp dword [edx + 4], esi
je 0x10004d5b
mov dword [edx + 8], eax
mov edx, dword [eax + 8]
mov dword [esi + 4], edx
test edx, edx
je 0x10004b2b
mov dword [edx], esi
mov dword [eax + 8], esi
mov edx, dword [esi]
mov dword [eax], edx
mov dword [esi], eax
mov eax, dword [esi + 4]
jmp 0x10004a73
mov esi, dword [ebx]
mov ecx, ebx
test esi, esi
jne 0x100048d6
mov dword [edi + 0x64], edx
mov dword [ebp - 0x1c], edx
jmp 0x100049c6
cmp esi, ebx
jne 0x10004a2f
mov esi, ecx
test eax, eax
jne 0x10004910
jmp 0x10004a3f
mov dword [edi + 0x64], ecx
jmp 0x10004a11
mov dword [edi + 0x64], ecx
jmp 0x100049c4
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x10004c30
test byte [ecx + 0xc], 1
je 0x10004c30
test edx, edx
jne 0x10004d6b
and dword [ecx + 0xc], 0xfffffffe
mov ecx, dword [eax]
or dword [eax + 0xc], 1
mov edx, dword [eax + 8]
test ecx, ecx
je 0x10004d90
cmp eax, dword [ecx + 4]
je 0x10004da0
mov dword [ecx + 8], edx
mov ecx, dword [edx + 4]
mov dword [eax + 8], ecx
test ecx, ecx
je 0x10004be6
mov dword [ecx], eax
mov dword [edx + 4], eax
mov ecx, dword [eax]
mov dword [edx], ecx
mov dword [eax], edx
mov eax, dword [esi + 4]
jmp 0x10004a88
mov eax, dword [esi + 8]
test eax, eax
je 0x10027930
mov edx, dword [eax + 0xc]
test dl, 1
jne 0x10004d10
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x10004c1f
test byte [ecx + 0xc], 1
jne 0x10004d00
mov edx, dword [eax + 8]
test edx, edx
jne 0x10004c68
lea esi, [esi]
lea esi, [esi]
or dword [eax + 0xc], 1
mov eax, dword [esi]
mov dword [ebp - 0x1c], esi
test eax, eax
je 0x10004af0
mov esi, eax
mov eax, dword [ebp - 0x1c]
test byte [eax + 0xc], 1
jne 0x10004af0
jmp 0x10004a53
mov dword [edx + 4], ecx
jmp 0x10004a11
mov dword [edx + 4], ecx
jmp 0x100049c4
test byte [edx + 0xc], 1
je 0x10004c30
test byte [edx + 0xc], 1
jne 0x10004cad
and dword [ecx + 0xc], 0xfffffffe
mov edx, dword [eax]
or dword [eax + 0xc], 1
mov ecx, dword [eax + 4]
test edx, edx
je 0x10004db8
cmp eax, dword [edx + 4]
je 0x10004dc8
mov dword [edx + 8], ecx
mov edx, dword [ecx + 8]
mov dword [eax + 4], edx
test edx, edx
je 0x10004ca1
mov dword [edx], eax
mov dword [ecx + 8], eax
mov edx, dword [eax]
mov dword [ecx], edx
mov dword [eax], ecx
mov eax, dword [esi + 8]
mov edx, dword [eax + 0xc]
mov ecx, dword [esi + 0xc]
and edx, 0xfffffffe
and ecx, 1
or edx, ecx
mov dword [eax + 0xc], edx
and dword [esi + 0xc], 0xfffffffe
mov eax, dword [eax + 8]
test eax, eax
je 0x10004ccd
and dword [eax + 0xc], 0xfffffffe
mov edx, dword [esi]
mov eax, dword [esi + 8]
test edx, edx
je 0x10004da8
cmp dword [edx + 4], esi
je 0x10004db0
mov dword [edx + 8], eax
mov edx, dword [eax + 4]
mov dword [esi + 8], edx
test edx, edx
je 0x10004cf2
mov dword [edx], esi
mov dword [eax + 4], esi
mov edx, dword [esi]
mov dword [eax], edx
mov dword [esi], eax
jmp 0x10004910
mov edx, dword [eax + 8]
test edx, edx
jne 0x10004c6e
jmp 0x10004c74
and edx, 0xfffffffe
mov dword [eax + 0xc], edx
mov edx, dword [esi]
or dword [esi + 0xc], 1
mov eax, dword [esi + 8]
test edx, edx
je 0x10004dc0
cmp dword [edx + 4], esi
je 0x10004dd0
mov dword [edx + 8], eax
mov edx, dword [eax + 4]
mov dword [esi + 8], edx
test edx, edx
je 0x10004d3f
mov dword [edx], esi
mov dword [eax + 4], esi
mov edx, dword [esi]
mov dword [eax], edx
mov dword [esi], eax
mov eax, dword [esi + 8]
jmp 0x10004c0e
mov dword [edi + 0x64], edx
mov dword [ebp - 0x1c], edx
jmp 0x100048e5
mov dword [edx + 4], eax
jmp 0x10004b1f
mov dword [esi + 4], edx
jmp 0x100048e2
test byte [edx + 0xc], 1
je 0x10004bb9
jmp 0x10004a88
mov dword [edi + 0x64], eax
jmp 0x10004ac1
mov dword [edx + 4], eax
jmp 0x10004ac1
mov dword [edi + 0x64], edx
jmp 0x10004bda
mov dword [edi + 0x64], eax
jmp 0x10004b1f
mov dword [ecx + 4], edx
jmp 0x10004bda
mov dword [edi + 0x64], eax
jmp 0x10004ce6
mov dword [edx + 4], eax
jmp 0x10004ce6
mov dword [edi + 0x64], ecx
jmp 0x10004c95
mov dword [edi + 0x64], eax
jmp 0x10004d33
mov dword [edx + 4], ecx
jmp 0x10004c95
mov dword [edx + 4], eax
jmp 0x10004d33
mov ecx, ebx
jmp 0x100048c9
mov eax, dword [4]
ud2
mov eax, dword [4]
ud2