Function at 0x6c8225a0
Capabilities:
Get process heap flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x58
mov eax, dword [ecx + 8]
mov edi, dword [ecx]
mov esi, dword [ecx + 4]
mov dword [ebp - 0x20], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x10c]
mov dword [esp], eax
call sym.krnl386.exe16_MapSL
movzx ebx, word [eax + 0x10]
sub esp, 4
mov eax, ebx
shl eax, 0x10
mov dword [esp], eax
mov dword [ebp - 0x28], eax
call sym.krnl386.exe16_MapSL
sub esp, 4
mov dword [ebp - 0x1c], eax
test di, di
je 0x6c822710
movzx eax, di
mov dword [ebp - 0x2c], eax
mov eax, edi
and eax, 3
mov word [ebp - 0x22], ax
cmp ax, 2
je 0x6c822728
test byte [0x6c8458d4], 8
jne 0x6c822742
mov eax, ebx
call fcn.6c820650
test eax, eax
je 0x6c822710
cmp word [ebp - 0x22], 0
jne 0x6c8226b0
mov eax, dword [ebp - 0x20]
test al, 0x80
jne 0x6c822843
movzx eax, ax
mov word [ebp - 0x24], di
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 0
test si, si
jne 0x6c822858
test byte [ebp - 0x20], 2
je 0x6c822ba8
cmp word [ebp - 0x22], 0
je 0x6c822c50
mov esi, dword [ebp - 0x1c]
add esi, dword [ebp - 0x2c]
cmp byte [esi + 3], 0
jne 0x6c822710
test byte [0x6c8458d4], 8
jne 0x6c822e4f
movzx eax, word [esi]
lea edx, [eax - 6]
mov eax, ebx
movzx edx, dx
call fcn.6c820d20
xor eax, eax
mov byte [esi + 2], 0x40
mov ecx, edi
mov word [esi], ax
jmp 0x6c822712
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x2c]
cmp byte [eax + 2], 0x40
mov dword [ebp - 0x30], eax
movzx edx, word [eax]
jne 0x6c822788
movzx eax, byte [0x6c8458d4]
test dx, dx
jne 0x6c822be0
test al, 8
jne 0x6c822ce0
mov eax, 5
movzx ecx, word [ebp - 0x20]
cmp si, ax
cmovae eax, esi
mov edx, eax
mov eax, ebx
add edx, 2
movzx edx, dx
call fcn.6c821660
movzx ebx, ax
test bx, bx
jne 0x6c822c20
lea esi, [esi]
nop
xor ecx, ecx
lea esp, [ebp - 0x10]
mov eax, ecx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0xc
mov eax, dword [ebp - 0x1c]
movzx edx, di
cmp byte [eax + edx + 3], 0xff
je 0x6c822710
test byte [0x6c8458d4], 8
je 0x6c82261f
movzx eax, word [ebp - 0x20]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0xc], str._04x__d__04x_ds_04x_n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp + 0x18], eax
movzx eax, si
mov dword [esp + 0x14], eax
movzx eax, di
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.6c820600
jmp 0x6c82261f
lea eax, [edx - 2]
mov ecx, eax
mov word [ebp - 0x24], ax
and cx, 3
jne 0x6c822b60
movzx eax, word [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
cmp word [edx + eax], di
je 0x6c8227e8
test byte [0x6c8458d4], 2
je 0x6c822710
mov dword [ebp - 0x1c], ecx
mov dword [esp + 0xc], str.Back_ptr_to_handle_is_invalid_n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 1
call fcn.6c820600
mov ecx, dword [ebp - 0x1c]
jmp 0x6c822712
mov eax, dword [ebp - 0x20]
movzx edx, ax
mov dword [ebp - 0x34], edx
test al, 0x80
je 0x6c822651
cmp word [ebp - 0x22], 2
jne 0x6c822843
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
sar eax, 8
and eax, 0xf
mov byte [edx + 2], al
test byte [0x6c8458d4], 8
je 0x6c822843
movzx eax, al
mov dword [esp + 0xc], str.Changing_flags_to__x._n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 3
call fcn.6c820600
mov ecx, edi
lea esp, [ebp - 0x10]
mov eax, ecx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0xc
movzx eax, word [ebp - 0x24]
sub eax, 4
mov word [ebp - 0x36], ax
movzx eax, ax
mov dword [ebp - 0x2c], eax
test byte [0x6c8458d4], 8
jne 0x6c822cb0
mov eax, 5
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x2c]
cmp si, ax
cmovae eax, esi
cmp word [ebp - 0x22], 2
mov esi, eax
lea eax, [esi + 2]
mov dword [ebp - 0x44], ecx
movzx ecx, word [ecx + 2]
cmovne eax, esi
mov word [ebp - 0x38], ax
movzx eax, ax
mov esi, eax
mov dword [ebp - 0x40], eax
movzx eax, word [ebp - 0x24]
lea eax, [esi + eax + 3]
and eax, 0xfffffffc
mov edx, eax
mov dword [ebp - 0x3c], eax
movzx eax, cx
cmp eax, edx
jge 0x6c822c78
sub cx, word [ebp - 0x24]
add eax, dword [ebp - 0x1c]
mov word [ebp - 0x24], cx
test byte [eax], 3
jne 0x6c8229a0
movzx eax, word [eax + 2]
cmp eax, dword [ebp - 0x3c]
jl 0x6c8229a0
test byte [0x6c8458d4], 8
jne 0x6c822e78
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym.krnl386.exe16_MapSL
mov ecx, eax
mov eax, dword [ebp - 0x2c]
sub esp, 4
mov dword [ebp - 0x28], ecx
movzx esi, word [ecx + eax + 2]
mov eax, ebx
mov word [ebp - 0x22], si
call fcn.6c820650
mov esi, eax
test eax, eax
je 0x6c822942
movzx edx, word [ebp - 0x22]
mov eax, dword [ebp - 0x28]
call fcn.6c820a90
mov edx, dword [ebp - 0x2c]
mov eax, ebx
sub word [esi + 4], 1
movzx esi, word [ebp - 0x3c]
sub si, word [ebp - 0x36]
movzx ecx, si
call fcn.6c820f10
test byte [ebp - 0x20], 0x40
je 0x6c82297d
mov edx, dword [ebp - 0x44]
movzx eax, word [ebp - 0x24]
movzx ebx, word [edx + 2]
lea esi, [edx + eax + 4]
add ebx, dword [ebp - 0x1c]
test byte [0x6c8458d4], 8
jne 0x6c822f0b
sub ebx, esi
mov dword [esp + 4], 0
mov dword [esp + 8], ebx
mov dword [esp], esi
call sub.ucrtbase.dll_memset
test byte [0x6c8458d4], 8
je 0x6c822843
movzx eax, di
mov dword [esp + 0xc], str.returning__04x_n
mov dword [esp + 0x10], eax
jmp 0x6c822827
movzx ecx, word [ebp - 0x20]
and cx, 2
jne 0x6c8229c6
cmp word [ebp - 0x22], 0
je 0x6c822d50
mov eax, dword [ebp - 0x1c]
movzx edx, di
cmp byte [eax + edx + 3], 0
jne 0x6c822e09
mov ecx, dword [ebp - 0x34]
mov eax, ebx
mov edx, dword [ebp - 0x40]
call fcn.6c821660
mov ecx, eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x20], ecx
mov dword [esp], eax
call sym.krnl386.exe16_MapSL
mov ecx, dword [ebp - 0x20]
sub esp, 4
cmp word [ebp - 0x22], 2
mov dword [ebp - 0x1c], eax
jne 0x6c822a00
mov eax, dword [ebp - 0x30]
movzx eax, word [eax]
sub eax, 6
mov word [ebp - 0x36], ax
movzx esi, word [ebp - 0x24]
mov dword [ebp - 0x20], esi
test cx, cx
jne 0x6c822d10
mov dword [esp + 8], esi
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_HeapAlloc]
sub esp, 0xc
mov ecx, eax
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x6c822710
movzx edx, word [ebp - 0x36]
mov dword [esp], ecx
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], esi
mov dword [ebp - 0x1c], edx
lea eax, [eax + edx + 4]
mov dword [esp + 4], eax
call sub.ucrtbase.dll_memcpy
mov edx, dword [ebp - 0x1c]
mov eax, ebx
call fcn.6c820d20
mov ecx, dword [ebp - 0x34]
mov eax, ebx
mov edx, dword [ebp - 0x40]
call fcn.6c821660
mov ecx, eax
test ax, ax
jne 0x6c822a9c
mov ecx, dword [ebp - 0x34]
mov edx, esi
mov eax, ebx
call fcn.6c821660
mov ecx, eax
movzx eax, word [ebp - 0x24]
mov word [ebp - 0x38], ax
test cx, cx
je 0x6c822ed0
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x30], ecx
mov dword [esp], eax
call sym.krnl386.exe16_MapSL
mov ecx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
sub esp, 4
movzx edx, cx
add eax, edx
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 0x20]
mov dword [esp + 4], esi
mov dword [esp], eax
mov dword [esp + 8], edx
call sub.ucrtbase.dll_memcpy
mov dword [esp + 8], esi
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]
mov ecx, dword [ebp - 0x30]
sub esp, 0xc
cmp word [ebp - 0x22], 2
movzx eax, byte [0x6c8458d4]
je 0x6c822da0
movzx edx, word [ebp - 0x24]
cmp word [ebp - 0x38], dx
mov edx, 0
cmove ecx, edx
test al, 8
je 0x6c822712
movzx eax, cx
mov dword [esp + 0xc], str.returning__04x_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 3
mov dword [ebp - 0x1c], ecx
call fcn.6c820600
mov ecx, dword [ebp - 0x1c]
jmp 0x6c822712
test byte [0x6c8458d4], 2
je 0x6c822710
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.__04x__04x_:_invalid_handle_n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp + 0x14], eax
mov dword [esp], 1
call fcn.6c820600
jmp 0x6c822710
cmp word [ebp - 0x20], 0
jne 0x6c822710
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x2c]
cmp byte [eax + edx + 3], 0
jne 0x6c822710
mov dword [esp], edx
call sym.krnl386.exe16_LocalFree16
sub esp, 4
mov ecx, eax
jmp 0x6c822712
test al, 4
je 0x6c8226d6
mov dword [esp + 0xc], str.Dicarded_block_has_non_zero_addr._n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 2
call fcn.6c820600
movzx eax, byte [0x6c8458d4]
jmp 0x6c8226d6
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym.krnl386.exe16_MapSL
lea ecx, [ebx + 2]
movzx edx, di
add edx, eax
sub esp, 4
mov word [edx], cx
xor ecx, ecx
mov word [edx + 2], cx
mov ecx, edi
mov word [eax + ebx], di
jmp 0x6c822712
test byte [0x6c8458d4], 8
jne 0x6c822e26
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym.krnl386.exe16_LocalFree16
sub esp, 4
mov ecx, eax
jmp 0x6c822712
test byte [0x6c8458d4], 8
jne 0x6c822d70
movzx ecx, word [ebp - 0x3c]
mov eax, ebx
sub cx, word [ebp - 0x36]
mov edx, dword [ebp - 0x2c]
movzx ecx, cx
call fcn.6c820f10
test byte [0x6c8458d4], 8
jne 0x6c82298a
mov ecx, edi
jmp 0x6c822845
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.arena_is__04x_n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 3
call fcn.6c820600
jmp 0x6c822876
mov dword [esp + 0xc], str.ReAllocating_discarded_block_n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 3
call fcn.6c820600
jmp 0x6c8226de
movzx eax, cx
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x20]
mov esi, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], ecx
mov edx, eax
add edx, esi
movzx esi, word [ebp - 0x36]
mov dword [esp], edx
lea eax, [eax + esi + 4]
mov dword [esp + 4], eax
call sub.ucrtbase.dll_memcpy
mov edx, esi
mov eax, ebx
call fcn.6c820d20
mov ecx, dword [ebp - 0x2c]
jmp 0x6c822af8
test byte [0x6c8458d4], 2
je 0x6c822710
mov dword [ebp - 0x1c], ecx
mov dword [esp + 0xc], str.Needed_to_move_fixed_block__but_LMEM_MOVEABLE_not_specified._n
jmp 0x6c8227c0
mov dword [esp + 0xc], str.size_reduction__making_new_free_block_n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 3
call fcn.6c820600
jmp 0x6c822c85
test al, 8
jne 0x6c822ea1
mov eax, dword [ebp - 0x1c]
add ecx, 2
movzx edx, di
mov word [eax + edx], cx
mov edx, dword [ebp - 0x28]
mov ecx, edi
cmp word [eax + edx], di
movzx eax, byte [0x6c8458d4]
je 0x6c822b0a
test al, 2
je 0x6c822b0a
mov dword [esp + 0xc], str.back_ptr_is_invalid._n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 1
mov dword [ebp - 0x1c], ecx
call fcn.6c820600
movzx eax, byte [0x6c8458d4]
mov ecx, dword [ebp - 0x1c]
jmp 0x6c822b0a
test byte [0x6c8458d4], 2
je 0x6c822710
mov dword [ebp - 0x1c], ecx
mov dword [esp + 0xc], str.Needed_to_move_locked_block__but_LMEM_MOVEABLE_not_specified._n
jmp 0x6c8227c0
mov dword [esp + 0xc], str.Freeing_fixed_block._n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 3
call fcn.6c820600
jmp 0x6c822c5d
mov dword [esp + 0xc], str.Discarding_block_n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 3
call fcn.6c820600
jmp 0x6c82268c
mov dword [esp + 0xc], str.size_increase__making_new_free_block_n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 3
call fcn.6c820600
jmp 0x6c8228f0
mov dword [esp + 0xc], str.fixing_handle_n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 3
mov dword [ebp - 0x20], ecx
call fcn.6c820600
mov ecx, dword [ebp - 0x20]
jmp 0x6c822da8
test byte [0x6c8458d4], 2
jne 0x6c822f43
mov edx, dword [ebp - 0x2c]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [ebp - 0x1c], ecx
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_HeapFree]
mov ecx, dword [ebp - 0x1c]
sub esp, 0xc
jmp 0x6c822712
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.Clearing_memory_from__p_to__p__DS_____p__n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 0x18], eax
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 3
call fcn.6c820600
jmp 0x6c822967
mov dword [esp + 0xc], str.Cant_restore_saved_block_n
mov dword [esp + 8], str.LocalReAlloc16
mov dword [esp + 4], 0x6c8458d4
mov dword [esp], 1
mov dword [ebp - 0x1c], ecx
call fcn.6c820600
mov ecx, dword [ebp - 0x1c]
jmp 0x6c822ed9