Function at 0x10004970
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x240
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x220], eax
test eax, eax
je 0x10004f70
mov esi, dword [ebp - 0x220]
mov dword [esi], 0
test byte [0x10008890], 8
jne 0x10004f28
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
add esi, 0x98
mov edx, dword [esi - 8]
mov edi, dword [esi - 0x14]
add eax, edx
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x21c], eax
cmp eax, edi
jge 0x10004ab8
cmp edi, 0xfff
jle 0x10005018
mov eax, dword [ebp - 0x21c]
cmp eax, 0xfff
jg 0x10004b78
mov esi, dword [ebp - 0x21c]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
lea edx, [esi + 0x200]
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 edi, eax
mov eax, dword [ebp + 8]
sub esp, 0xc
test esi, esi
mov edx, dword [eax + 0x80]
jle 0x10005187
lea eax, [esi - 1]
mov ebx, edi
and eax, 0xfffffe00
mov dword [ebp - 0x224], edi
lea esi, [edi + eax + 0x200]
mov edi, dword [ebp - 0x214]
jmp 0x10004a67
mov eax, edi
add ebx, 0x200
call dbg.STORAGE_get_next_big_blocknr
cmp esi, ebx
mov edx, eax
je 0x10005178
mov ecx, ebx
mov eax, edi
mov dword [ebp - 0x218], edx
call dbg.STORAGE_get_big_block
mov edx, dword [ebp - 0x218]
test eax, eax
jne 0x10004a50
mov edi, dword [ebp - 0x224]
mov eax, dword fs:[0x18]
mov dword [esp + 8], edi
mov dword [esp + 4], 0
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]
mov eax, 0x80004005
pop ebx
pop esi
pop edi
pop ebp
ret
jle 0x10004bc2
cmp edi, 0xfff
jg 0x10004e90
cmp dword [ebp - 0x21c], 0xfff
jg 0x10004f88
test edi, edi
je 0x10005100
mov eax, dword [ebp + 8]
mov ecx, edi
shr ecx, 6
mov edx, dword [eax + 0x80]
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_get_nth_next_small_blocknr
mov ebx, eax
test ebx, ebx
js 0x10004aaa
mov esi, edi
sar esi, 0x1f
and esi, 0x3f
add esi, edi
mov edi, dword [ebp - 0x21c]
sar esi, 6
mov eax, edi
sar eax, 0x1f
and eax, 0x3f
add eax, edi
sar eax, 6
cmp eax, esi
jle 0x10005240
mov dword [ebp - 0x224], eax
mov edi, dword [ebp - 0x214]
jmp 0x10004b5c
mov ecx, eax
mov edx, dword [ebp - 0x218]
mov eax, edi
call dbg.STORAGE_set_small_chain
test eax, eax
je 0x10004aaa
inc esi
cmp dword [ebp - 0x224], esi
je 0x10005240
mov eax, edi
mov dword [ebp - 0x218], ebx
call dbg.STORAGE_get_free_small_blocknr
mov ebx, eax
test eax, eax
jns 0x10004b38
jmp 0x10004aaa
sar eax, 9
mov ecx, eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x80]
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_get_nth_next_big_blocknr
mov edx, eax
test eax, eax
js 0x1000544a
mov ecx, 0xfffffffe
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_set_big_chain
test eax, eax
je 0x10004aaa
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x21c]
mov dword [eax + 0x84], edi
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x214]
lea ecx, [eax + 0xc]
mov edx, dword [eax + 0x8c]
mov eax, edi
call dbg.STORAGE_put_pps_entry
test eax, eax
je 0x10004aaa
mov eax, dword [ebp + 8]
cmp dword [eax + 0x84], 0xfff
mov ecx, dword [eax + 0x90]
mov edx, dword [eax + 0x80]
ja 0x10004d68
shr ecx, 6
mov eax, edi
call dbg.STORAGE_get_nth_next_small_blocknr
mov dword [ebp - 0x218], eax
test eax, eax
js 0x10005410
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x10004ce1
jmp 0x10005140
xor edx, edx
test al, 2
je 0x10004c51
mov dx, word [esi]
mov word [edi], dx
mov edx, 2
test al, 1
je 0x10004c5b
mov al, byte [esi + edx]
mov byte [edi + edx], al
mov edi, dword [ebp - 0x218]
mov esi, dword [ebp - 0x214]
mov ecx, dword [ebp - 0x21c]
mov edx, edi
mov eax, esi
call dbg.STORAGE_put_small_block
test eax, eax
je 0x10004aaa
mov eax, dword [ebp + 0x10]
sub eax, ebx
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 0x224]
add eax, ebx
mov dword [ebp - 0x224], eax
mov eax, dword [ebp + 0xc]
add eax, ebx
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x90]
add edx, ebx
mov dword [eax + 0x90], edx
mov eax, dword [ebp - 0x220]
mov edx, edi
mov ecx, dword [eax]
add ecx, ebx
mov dword [eax], ecx
mov eax, esi
call dbg.STORAGE_get_next_small_blocknr
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x218], eax
test ebx, ebx
je 0x10005140
mov eax, dword [ebp - 0x218]
test eax, eax
js 0x100053d6
mov ecx, dword [ebp - 0x21c]
mov edx, dword [ebp - 0x218]
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_get_small_block
test eax, eax
je 0x10004aaa
mov eax, dword [ebp + 8]
mov ebx, 0x40
mov eax, dword [eax + 0x90]
mov edx, eax
mov dword [ebp - 0x228], eax
and edx, 0x3f
sub ebx, edx
cmp ebx, dword [ebp + 0x10]
jbe 0x10004d23
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp - 0x21c]
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x224]
add edx, esi
add ecx, edi
mov eax, ebx
mov edi, edx
mov esi, ecx
cmp ebx, 4
jb 0x10004c40
test dl, 1
jne 0x10005168
test edi, 2
jne 0x10005150
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x10004c40
shr ecx, 9
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_get_nth_next_big_blocknr
mov edi, eax
test eax, eax
js 0x10005484
lea eax, [ebp - 0x20c]
mov ecx, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 0x21c], eax
test ecx, ecx
je 0x10005140
mov dword [ebp - 0x218], esi
mov edx, edi
mov esi, dword [ebp - 0x21c]
mov edi, dword [ebp + 8]
jmp 0x10004e6c
mov eax, dword [edi + 0x90]
mov ebx, 0x200
and eax, 0x1ff
mov edx, dword [ebp - 0x21c]
sub ebx, eax
cmp ebx, dword [ebp + 0x10]
jbe 0x10004dd0
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x21c], edx
mov ecx, dword [ebp - 0x218]
mov edx, dword [ebp + 0xc]
add eax, esi
add ecx, edx
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._memcpy
mov ecx, esi
mov edx, dword [ebp - 0x21c]
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_put_big_block
test eax, eax
je 0x10004aaa
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
sub eax, ebx
add ecx, ebx
mov dword [ebp + 0x10], eax
mov eax, dword [edi + 0x90]
add eax, ebx
mov dword [ebp + 0xc], ecx
mov ecx, dword [ebp - 0x220]
mov dword [edi + 0x90], eax
mov edx, dword [ebp - 0x218]
mov eax, dword [ecx]
add edx, ebx
add eax, ebx
mov dword [ebp - 0x218], edx
mov dword [ecx], eax
mov edx, dword [ebp - 0x21c]
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_get_next_big_blocknr
mov edx, eax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x10005140
test edx, edx
js 0x100053f3
mov ecx, esi
mov eax, dword [ebp - 0x214]
mov dword [ebp - 0x21c], edx
call dbg.STORAGE_get_big_block
test eax, eax
jne 0x10004db0
jmp 0x10004aaa
mov eax, dword [ebp + 8]
mov ecx, edi
shr ecx, 9
mov edx, dword [eax + 0x80]
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_get_nth_next_big_blocknr
mov ebx, eax
test eax, eax
js 0x10005467
sar edi, 9
mov esi, edi
mov edi, dword [ebp - 0x21c]
mov eax, edi
sar eax, 0x1f
and eax, 0x1ff
add eax, edi
sar eax, 9
cmp eax, esi
jle 0x10005120
mov dword [ebp - 0x224], eax
mov edi, dword [ebp - 0x214]
jmp 0x10004f0c
mov ecx, eax
mov edx, dword [ebp - 0x218]
mov eax, edi
call dbg.STORAGE_set_big_chain
test eax, eax
je 0x10004aaa
inc esi
cmp dword [ebp - 0x224], esi
je 0x10005120
mov eax, edi
mov dword [ebp - 0x218], ebx
call dbg.STORAGE_get_free_big_blocknr
mov ebx, eax
test eax, eax
jns 0x10004ee8
jmp 0x10004aaa
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__p_____p__ld__p__n
mov dword [esp + 8], global___func__.2
mov dword [esp + 4], 0x10008890
mov dword [esp], 3
call dbg.wine_dbg_log
jmp 0x100049a6
lea edi, [ebp - 0x210]
mov dword [ebp - 0x220], edi
jmp 0x1000498d
test edi, edi
jne 0x10005060
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_get_free_big_blocknr
mov ebx, eax
test eax, eax
js 0x10004aaa
mov eax, dword [ebp + 8]
mov dword [eax + 0x80], ebx
mov esi, edi
sar esi, 0x1f
and esi, 0x1ff
add esi, edi
mov edi, dword [ebp - 0x21c]
sar edi, 9
sar esi, 9
mov dword [ebp - 0x224], edi
mov edi, dword [ebp - 0x214]
jmp 0x10004ffc
mov ecx, eax
mov edx, dword [ebp - 0x218]
mov eax, edi
call dbg.STORAGE_set_big_chain
test eax, eax
je 0x10004aaa
inc esi
cmp esi, dword [ebp - 0x224]
je 0x10005120
mov eax, edi
mov dword [ebp - 0x218], ebx
call dbg.STORAGE_get_free_big_blocknr
mov ebx, eax
test eax, eax
jns 0x10004fd8
jmp 0x10004aaa
mov ecx, eax
sar ecx, 0x1f
and ecx, 0x3f
add ecx, eax
mov eax, dword [ebp + 8]
sar ecx, 6
mov edx, dword [eax + 0x80]
mov eax, esi
call dbg.STORAGE_get_nth_next_small_blocknr
mov edx, eax
test eax, eax
js 0x1000542d
mov ecx, 0xfffffffe
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_set_small_chain
test eax, eax
jne 0x10004bb3
jmp 0x10004aaa
lea edx, [edi + 0x200]
mov dword [esp + 4], 0
mov dword [esp + 8], edx
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 ebx, eax
mov dword [ebp - 0x224], eax
mov eax, dword [ebp + 8]
sub esp, 0xc
test edi, edi
mov edx, dword [eax + 0x80]
jle 0x1000526f
lea eax, [edi - 1]
mov dword [ebp - 0x228], edi
and eax, 0xffffffc0
mov edi, dword [ebp - 0x214]
lea esi, [ebx + eax + 0x40]
jmp 0x100050da
mov edx, dword [ebp - 0x218]
mov eax, edi
call dbg.STORAGE_get_next_small_blocknr
add ebx, 0x40
mov edx, eax
cmp ebx, esi
je 0x10005260
mov ecx, ebx
mov eax, edi
mov dword [ebp - 0x218], edx
call dbg.STORAGE_get_small_block
test eax, eax
jne 0x100050c0
mov edi, dword [ebp - 0x224]
mov eax, dword fs:[0x18]
jmp 0x10004a8c
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_get_free_small_blocknr
mov ebx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x80], ebx
jmp 0x10004afd
mov ecx, 0xfffffffe
mov edx, ebx
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_set_big_chain
test eax, eax
jne 0x10004bb3
jmp 0x10004aaa
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dx, word [esi]
add edi, 2
mov word [edi - 2], dx
add esi, 2
sub eax, 2
jmp 0x10004d5a
mov al, byte [ecx]
inc edi
mov byte [edx], al
inc esi
lea eax, [ebx - 1]
jmp 0x10004d4e
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x224]
mov edx, dword [eax + 0x80]
mov esi, dword [ebp - 0x214]
or ecx, 0xffffffff
mov eax, esi
call dbg.STORAGE_set_big_chain
test eax, eax
je 0x10004a86
mov eax, esi
call dbg.STORAGE_get_free_small_blocknr
mov edx, eax
mov eax, dword [ebp + 8]
test edx, edx
mov dword [eax + 0x80], edx
js 0x10004a86
mov eax, dword [ebp - 0x21c]
test eax, eax
jle 0x1000535e
dec eax
mov ebx, edi
and eax, 0xffffffc0
mov dword [ebp - 0x228], edi
add eax, edi
mov dword [ebp - 0x224], eax
jmp 0x1000521d
cmp dword [ebp - 0x224], ebx
mov edx, dword [ebp - 0x218]
je 0x10005340
mov eax, esi
mov dword [ebp - 0x218], edx
call dbg.STORAGE_get_free_small_blocknr
mov edi, eax
test eax, eax
js 0x10005230
mov ecx, eax
mov edx, dword [ebp - 0x218]
mov eax, esi
call dbg.STORAGE_set_small_chain
test eax, eax
je 0x10005230
add ebx, 0x40
mov edx, edi
mov ecx, ebx
mov eax, esi
mov dword [ebp - 0x218], edx
call dbg.STORAGE_put_small_block
test eax, eax
jne 0x100051e0
mov edi, dword [ebp - 0x228]
jmp 0x10004a86
mov ecx, 0xfffffffe
mov edx, ebx
mov eax, dword [ebp - 0x214]
call dbg.STORAGE_set_small_chain
test eax, eax
jne 0x10004bb3
jmp 0x10004aaa
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x228]
mov edx, dword [eax + 0x80]
mov esi, dword [ebp - 0x214]
or ecx, 0xffffffff
mov eax, esi
call dbg.STORAGE_set_small_chain
test eax, eax
je 0x100050ed
mov eax, esi
mov dword [ebp - 0x214], esi
call dbg.STORAGE_get_free_big_blocknr
mov ecx, dword [ebp + 8]
mov ebx, eax
test eax, eax
mov dword [ecx + 0x80], eax
js 0x100050ed
mov eax, dword [ecx + 0x84]
test eax, eax
jle 0x100053a7
dec eax
mov edx, dword [ebp - 0x224]
and eax, 0xfffffe00
mov esi, edx
mov ecx, eax
mov dword [ebp - 0x22c], edi
add ecx, edx
mov edi, dword [ebp - 0x214]
mov dword [ebp - 0x228], ecx
mov edx, ebx
jmp 0x10005328
cmp dword [ebp - 0x228], esi
mov edx, dword [ebp - 0x218]
je 0x10005387
mov eax, edi
mov dword [ebp - 0x218], edx
call dbg.STORAGE_get_free_big_blocknr
mov ebx, eax
test eax, eax
js 0x100050ed
mov ecx, eax
mov edx, dword [ebp - 0x218]
mov eax, edi
call dbg.STORAGE_set_big_chain
test eax, eax
je 0x100050ed
add esi, 0x200
mov edx, ebx
mov ecx, esi
mov eax, edi
mov dword [ebp - 0x218], edx
call dbg.STORAGE_put_big_block
test eax, eax
jne 0x100052e0
jmp 0x100050ed
mov ecx, 0xfffffffe
mov eax, dword [ebp - 0x214]
mov edi, dword [ebp - 0x228]
call dbg.STORAGE_set_small_chain
test eax, eax
je 0x10004a86
mov dword [esp + 8], edi
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
jmp 0x10004bb3
mov ecx, 0xfffffffe
mov eax, dword [ebp - 0x214]
mov edi, dword [ebp - 0x22c]
mov ebx, edx
call dbg.STORAGE_set_big_chain
test eax, eax
je 0x100050ed
mov esi, dword [ebp - 0x224]
mov dword [esp + 4], 0
mov dword [esp + 8], esi
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
jmp 0x10004fae
mov dword [esp + 8], 0x5c8
mov dword [esp + 4], str..._wine_9.10_dlls_storage.dll16_storage.c
mov dword [esp], str.blocknr_0
call dword [sym.imp.ucrtbase.dll__assert]
mov dword [esp + 8], 0x5e4
mov dword [esp + 4], str..._wine_9.10_dlls_storage.dll16_storage.c
mov dword [esp], str.blocknr_0
call dword [sym.imp.ucrtbase.dll__assert]
mov dword [esp + 8], 0x5c5
mov dword [esp + 4], str..._wine_9.10_dlls_storage.dll16_storage.c
mov dword [esp], str.blocknr_0
call dword [sym.imp.ucrtbase.dll__assert]
mov dword [esp + 8], 0x507
mov dword [esp + 4], str..._wine_9.10_dlls_storage.dll16_storage.c
mov dword [esp], str.blocknr_0
call dword [sym.imp.ucrtbase.dll__assert]
mov dword [esp + 8], 0x50f
mov dword [esp + 4], str..._wine_9.10_dlls_storage.dll16_storage.c
mov dword [esp], str.blocknr_0
call dword [sym.imp.ucrtbase.dll__assert]
mov dword [esp + 8], 0x54f
mov dword [esp + 4], str..._wine_9.10_dlls_storage.dll16_storage.c
mov dword [esp], str.blocknr_0
call dword [sym.imp.ucrtbase.dll__assert]
mov dword [esp + 8], 0x5e1
mov dword [esp + 4], str..._wine_9.10_dlls_storage.dll16_storage.c
mov dword [esp], str.blocknr_0
call dword [sym.imp.ucrtbase.dll__assert]
lea esi, [esi]
lea esi, [esi]
nop