Function at 0x401560
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, 0x528
mov eax, dword [ecx + 4]
mov edi, dword [ecx]
mov dword [ebp - 0x500], eax
movzx eax, byte [section..data]
test al, 8
jne 0x401b5c
test edi, edi
jle 0x401c82
xor esi, esi
jmp 0x4015ab
add esi, 1
cmp edi, esi
jle 0x401718
test al, 1
je 0x4015a0
mov eax, dword [ebp - 0x500]
mov ebx, dword [eax + esi*4]
test ebx, ebx
je 0x401b52
mov eax, ebx
shr eax, 0x10
je 0x401ac1
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x4016de
cmp word [ebx], 0
je 0x401cce
lea esi, [esi]
nop
mov eax, edx
lea edx, [edx + 1]
cmp word [ebx + eax*2 + 2], 0
jne 0x401600
movzx edx, word [str.L__n_r_t_..WINEDEBUG]
mov dword [ebp - 0x504], esi
lea ecx, [ebp - 0x26e]
mov dword [ebp - 0x4fc], ebx
mov word [ebp - 0x270], dx
jmp 0x401665
cmp dx, 9
je 0x4018a0
cmp dx, 0xa
jne 0x4018c0
movzx edx, word [0x404074]
add ecx, 2
mov word [ecx - 2], dx
lea edx, [eax - 1]
test eax, eax
jle 0x4016ab
lea eax, [ebp - 0x14e]
cmp eax, ecx
jb 0x4016ab
mov eax, edx
add dword [ebp - 0x4fc], 2
mov esi, dword [ebp - 0x4fc]
movzx edx, word [esi - 2]
cmp dx, 0xd
je 0x401888
jbe 0x401630
cmp dx, 0x22
je 0x401918
cmp dx, 0x5c
jne 0x4018b3
movzx esi, word [0x40407c]
add ecx, 2
lea edx, [eax - 1]
mov word [ecx - 2], si
test eax, eax
jg 0x401659
mov byte [ecx], 0x22
mov esi, dword [ebp - 0x504]
lea eax, [ecx + 1]
test edx, edx
jle 0x4016cd
movzx eax, word [0x40407e]
mov byte [ecx + 3], 0x2e
mov word [ecx + 1], ax
lea eax, [ecx + 4]
mov byte [eax], 0
lea eax, [ebp - 0x270]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
mov dword [esp + 0x10], eax
add esi, 1
mov dword [esp + 0xc], 0x40403d
mov dword [esp + 8], global___func__
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
movzx eax, byte [section..data]
cmp edi, esi
jg 0x4015ab
test al, 8
je 0x401740
mov dword [esp + 0xc], 0x404041
mov dword [esp + 8], global___func__
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
cmp edi, 1
jle 0x401c82
xor esi, esi
mov dword [ebp - 0x504], edi
xor edx, edx
mov ebx, 1
mov eax, dword fs:[0x18]
mov dword [ebp - 0x510], 0
mov dword [ebp - 0x4fc], 0
mov dword [ebp - 0x50c], eax
mov dword [ebp - 0x508], esi
jmp 0x4017fd
mov edi, dword [ebp - 0x4fc]
test edi, edi
je 0x401930
mov ecx, dword [ebp - 0x508]
cmp esi, ecx
jl 0x4017e8
mov eax, ecx
test ecx, ecx
je 0x401ad9
add eax, eax
mov dword [ebp - 0x508], eax
shl eax, 2
test edx, edx
je 0x401af0
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x50c]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
mov edx, eax
mov eax, dword [ebp - 0x500]
sub esp, 0x10
mov eax, dword [eax + ebx*4]
mov dword [edx + esi*4], eax
add esi, 1
add ebx, 1
cmp dword [ebp - 0x504], ebx
je 0x401945
mov eax, dword [ebp - 0x500]
mov eax, dword [eax + ebx*4]
cmp word [eax], 0x2f
jne 0x401780
movzx ecx, word [eax + 2]
mov edi, ecx
and edi, 0xffffffdf
cmp di, 0x43
je 0x401b25
cmp cx, 0x3f
jne 0x4017ee
mov dword [esp], 0
lea ebx, [ebp - 0x270]
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x3eb
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
mov eax, ebx
sub esp, 0x10
call dbg.write_to_stdout
mov dword [ebp - 0x508], 0
mov eax, dword [ebp - 0x508]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
movzx esi, word [0x404076]
add ecx, 2
mov word [ecx - 2], si
jmp 0x401652
movzx edx, word [0x404078]
add ecx, 2
mov word [ecx - 2], dx
jmp 0x401652
lea esi, [edx - 0x20]
cmp si, 0x5e
jbe 0x401b48
mov esi, edx
mov byte [ecx], 0x5c
add ecx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdefwmain]
mov esi, edx
shr si, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefwmain]
mov esi, edx
and edx, 0xf
shr si, 4
movzx edx, byte [edx + str.0123456789abcdefwmain]
and esi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefwmain]
mov byte [ecx - 1], dl
mov byte [ecx - 2], bl
jmp 0x401652
movzx esi, word [0x40407a]
add ecx, 2
mov word [ecx - 2], si
jmp 0x401652
mov dword [ebp - 0x4fc], eax
add ebx, 1
cmp dword [ebp - 0x504], ebx
jne 0x4017fd
mov ecx, esi
mov esi, dword [ebp - 0x4fc]
test esi, esi
je 0x401c82
test ecx, ecx
je 0x401cee
mov ebx, dword [ebp - 0x510]
mov edi, 0x404044
mov eax, 0x404046
mov dword [ebp - 0x508], 1
mov dword [ebp - 0x514], ecx
mov esi, dword [sym.imp.ucrtbase.dll_wcstok]
test ebx, ebx
mov dword [ebp - 0x50c], edx
cmovne eax, edi
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
xor ebx, ebx
mov dword [ebp - 0x504], eax
lea esi, [esi]
mov eax, dword [ebp - 0x50c]
lea ecx, [ebp - 0x478]
mov eax, dword [eax + ebx*4]
mov dword [esp], ecx
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_wcscpy]
lea ecx, [ebp - 0x478]
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll__wcsupr]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov eax, dword [ebp - 0x50c]
mov eax, dword [eax + ebx*4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x401bea
mov dword [ebp - 0x500], eax
mov dword [ebp - 0x510], ebx
lea esi, [esi]
mov eax, dword [ebp - 0x500]
call dbg.read_line_from_handle
mov ebx, eax
test eax, eax
je 0x401b98
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x504]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
call esi
mov edx, eax
test eax, eax
jne 0x401a87
jmp 0x401a9c
mov dword [esp + 8], 0
mov dword [esp + 4], 0x404046
mov dword [esp], 0
call esi
mov edx, eax
test eax, eax
je 0x401a9c
mov eax, ebx
call dbg.run_find_for_line
test eax, eax
je 0x401a68
mov dword [ebp - 0x508], 0
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 edi
sub esp, 0xc
jmp 0x401a28
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0
jmp 0x4016de
mov dword [ebp - 0x508], 2
mov eax, 8
test edx, edx
jne 0x4017b5
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edx, eax
mov eax, dword [ebp - 0x500]
sub esp, 0xc
mov eax, dword [eax + ebx*4]
jmp 0x4017e8
cmp word [eax + 4], 0x3a
jne 0x4017ee
mov dword [ebp - 0x510], 1
add eax, 6
mov dword [ebp - 0x4fc], eax
jmp 0x4017ee
mov byte [ecx], dl
add ecx, 1
jmp 0x401652
mov eax, str._null_
jmp 0x4016de
mov dword [esp + 0xc], str.running_find:
mov dword [esp + 8], global___func__
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
test edi, edi
jle 0x401c55
movzx eax, byte [section..data]
jmp 0x401599
mov ecx, dword [ebp - 0x500]
mov ebx, dword [ebp - 0x510]
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
add ebx, 1
cmp dword [ebp - 0x514], ebx
jne 0x4019a0
mov edx, dword [ebp - 0x50c]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
jmp 0x401870
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
lea edx, [ebp - 0x4f8]
sub esp, 4
mov dword [esp + 8], edx
mov dword [esp + 0xc], 0x40
mov dword [esp + 4], 0x3ea
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
lea edx, [ebp - 0x4f8]
lea eax, [ebp - 0x478]
sub esp, 0x10
mov dword [esp + 4], edx
lea edx, [ebp - 0x270]
mov dword [esp], edx
mov dword [esp + 8], eax
call dword [sym.imp.user32.dll_wsprintfW]
lea edx, [ebp - 0x270]
mov eax, edx
call dbg.write_to_stdout
jmp 0x401bb0
test byte [section..data], 8
je 0x401c82
mov dword [esp + 0xc], 0x404041
mov dword [esp + 8], global___func__
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov dword [esp], 0
lea ebx, [ebp - 0x270]
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x3e8
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
mov eax, ebx
sub esp, 0x10
call dbg.write_to_stdout
mov dword [ebp - 0x508], 2
jmp 0x401870
movzx eax, word [str.L__n_r_t_..WINEDEBUG]
mov byte [ebp - 0x26e], 0x22
mov word [ebp - 0x270], ax
lea eax, [ebp - 0x26d]
jmp 0x4016cd
mov dword [ebp - 0x50c], edx
mov dword [esp], 0xfffffff6
call dword [sym.imp.kernel32.dll_GetStdHandle]
mov ecx, 0x404044
mov dword [ebp - 0x508], 1
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x500], eax
mov eax, dword [ebp - 0x510]
sub esp, 4
mov esi, dword [sym.imp.ucrtbase.dll_wcstok]
test eax, eax
mov eax, 0x404046
cmovne eax, ecx
mov dword [ebp - 0x504], eax
mov eax, dword [ebp - 0x500]
call dbg.read_line_from_handle
mov ebx, eax
test eax, eax
je 0x401bbf
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x504]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
call esi
mov edx, eax
test eax, eax
jne 0x401d97
jmp 0x401dac
mov dword [esp + 8], 0
mov dword [esp + 4], 0x404046
mov dword [esp], 0
call esi
mov edx, eax
test eax, eax
je 0x401dac
mov eax, ebx
call dbg.run_find_for_line
test eax, eax
je 0x401d78
mov dword [ebp - 0x508], 0
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 edi
sub esp, 0xc
jmp 0x401d3b