Function at 0x401550
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 - 0x504], eax
movzx eax, byte [section..data]
test al, 8
jne 0x401b70
test edi, edi
jle 0x401bd1
xor esi, esi
jmp 0x40159b
add esi, 1
cmp edi, esi
jle 0x401712
mov edx, eax
and edx, 8
je 0x401590
mov eax, dword [ebp - 0x504]
mov ebx, dword [eax + esi*4]
test ebx, ebx
je 0x401b00
mov eax, ebx
shr eax, 0x10
je 0x401a88
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 0x4016d3
cmp word [ebx], 0
je 0x401c8b
lea esi, [esi]
nop
mov eax, edx
lea edx, [edx + 1]
cmp word [ebx + eax*2 + 2], 0
jne 0x4015f0
movzx edx, word [str.L__n_r_t_..WINEDEBUG]
mov dword [ebp - 0x500], esi
lea ecx, [ebp - 0x26e]
mov dword [ebp - 0x4fc], ebx
mov word [ebp - 0x270], dx
jmp 0x401655
cmp dx, 9
je 0x4019a8
cmp dx, 0xa
jne 0x4019c8
movzx edx, word [0x404090]
add ecx, 2
mov word [ecx - 2], dx
lea edx, [eax - 1]
test eax, eax
jle 0x4016a0
lea eax, [ebp - 0x14e]
cmp eax, ecx
jb 0x4016a0
mov eax, edx
add dword [ebp - 0x4fc], 2
mov ebx, dword [ebp - 0x4fc]
movzx edx, word [ebx - 2]
cmp dx, 0xd
je 0x401990
jbe 0x401620
cmp dx, 0x22
je 0x401a20
cmp dx, 0x5c
jne 0x4019bb
movzx ebx, word [0x404098]
add ecx, 2
lea edx, [eax - 1]
mov word [ecx - 2], bx
test eax, eax
jg 0x401649
lea esi, [esi]
nop
mov byte [ecx], 0x22
mov esi, dword [ebp - 0x500]
lea eax, [ecx + 1]
test edx, edx
jle 0x4016c2
movzx eax, word [0x40409a]
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], 0x404043
mov dword [esp + 8], global___func__
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
movzx eax, byte [section..data]
mov edx, eax
and edx, 8
cmp edi, esi
jg 0x40159b
test dl, dl
je 0x40173a
mov dword [esp + 0xc], 0x404047
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 0x401bd1
xor edx, edx
mov dword [ebp - 0x500], edi
xor ecx, ecx
xor esi, esi
mov edi, edx
mov ebx, 1
mov edx, dword [ebp - 0x504]
mov dword [ebp - 0x4fc], 0
mov eax, dword fs:[0x18]
mov dword [ebp - 0x508], eax
jmp 0x4017df
cmp esi, edi
jg 0x4017ce
test esi, esi
je 0x401a38
add esi, esi
mov dword [ebp - 0x504], edx
lea eax, [esi*4]
test ecx, ecx
je 0x401a50
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x508]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
mov edx, dword [ebp - 0x504]
mov ecx, eax
sub esp, 0x10
mov eax, dword [edx + ebx*4]
mov dword [ecx + edi*4], eax
add ebx, 1
add edi, 1
cmp dword [ebp - 0x500], ebx
je 0x401806
mov eax, dword [edx + ebx*4]
cmp word [eax], 0x2f
je 0x401ab0
cmp dword [ebp - 0x4fc], 0
jne 0x401778
mov dword [ebp - 0x4fc], eax
add ebx, 1
cmp dword [ebp - 0x500], ebx
jne 0x4017df
test edi, edi
je 0x401c00
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x510], edi
mov ebx, 1
mov dword [ebp - 0x508], 0
mov dword [ebp - 0x504], eax
mov dword [ebp - 0x50c], ecx
lea esi, [esi]
mov edi, dword [ebp - 0x50c]
mov esi, dword [ebp - 0x508]
mov eax, dword [edi + esi*4]
mov dword [esp + 4], eax
lea eax, [ebp - 0x478]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscpy]
lea eax, [ebp - 0x478]
mov dword [esp], eax
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 [edi + esi*4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [ebp - 0x500], eax
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x401b10
mov eax, str._r_n__________
call dbg.write_to_stdout
lea eax, [ebp - 0x478]
call dbg.write_to_stdout
mov eax, 0x40401e
call dbg.write_to_stdout
mov edi, dword fs:[0x18]
jmp 0x401917
mov edx, dword [ebp - 0x4fc]
mov eax, esi
call sym._run_find_for_line
mov dword [esp + 8], esi
test eax, eax
mov eax, 0
mov dword [esp + 4], 0
cmovne ebx, eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x504]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x500]
call dbg.read_line_from_handle
mov esi, eax
test eax, eax
jne 0x4018e0
mov eax, dword [ebp - 0x500]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
add dword [ebp - 0x508], 1
mov eax, dword [ebp - 0x508]
cmp dword [ebp - 0x510], eax
jne 0x401838
mov ecx, dword [ebp - 0x50c]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x504]
call eax
mov eax, ebx
sub esp, 0xc
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
movzx ebx, word [0x404092]
add ecx, 2
mov word [ecx - 2], bx
jmp 0x401642
movzx edx, word [0x404094]
add ecx, 2
mov word [ecx - 2], dx
jmp 0x401642
lea esi, [edx - 0x20]
cmp si, 0x5e
jbe 0x401aa0
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 0x401642
movzx ebx, word [0x404096]
add ecx, 2
mov word [ecx - 2], bx
jmp 0x401642
mov dword [ebp - 0x504], edx
mov eax, 8
mov esi, 2
test ecx, ecx
jne 0x40179b
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edx, dword [ebp - 0x504]
mov ecx, eax
sub esp, 0xc
mov eax, dword [edx + ebx*4]
jmp 0x4017ce
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0
jmp 0x4016d3
mov byte [ecx], dl
add ecx, 1
jmp 0x401642
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], 0x3e9
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
mov eax, ebx
mov ebx, 2
sub esp, 0x10
call dbg.write_to_stdout
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov eax, str._null_
jmp 0x4016d3
mov dword [esp], 0
lea esi, [ebp - 0x4f8]
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 8], esi
mov dword [esp + 0xc], 0x40
mov dword [esp + 4], 0x3ea
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
lea eax, [ebp - 0x478]
sub esp, 0x10
mov dword [esp + 4], esi
lea esi, [ebp - 0x270]
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [sym.imp.user32.dll_wsprintfW]
mov eax, esi
call dbg.write_to_stdout
jmp 0x40193a
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 0x401ba4
movzx eax, byte [section..data]
jmp 0x401589
test byte [section..data], 8
je 0x401bd1
mov dword [esp + 0xc], 0x404047
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
jmp 0x401ada
mov dword [ebp - 0x508], ecx
mov ebx, 1
mov dword [esp], 0xfffffff6
call dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [ebp - 0x500], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 4
mov edi, dword fs:[0x18]
mov dword [ebp - 0x504], eax
jmp 0x401c6f
mov edx, dword [ebp - 0x4fc]
mov eax, esi
call sym._run_find_for_line
mov dword [esp + 8], esi
test eax, eax
mov eax, 0
mov dword [esp + 4], 0
cmovne ebx, eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x504]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x500]
call dbg.read_line_from_handle
mov esi, eax
test eax, eax
jne 0x401c38
mov ecx, dword [ebp - 0x508]
jmp 0x401959
movzx eax, word [str.L__n_r_t_..WINEDEBUG]
mov byte [ebp - 0x26e], 0x22
mov word [ebp - 0x270], ax
lea eax, [ebp - 0x26d]
jmp 0x4016c2