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]
mov dword [ebp - 0x500], eax
mov eax, dword [ecx + 4]
mov dword [ebp - 0x504], eax
movzx eax, byte [section..data]
test al, 8
jne 0x401bdd
mov edx, dword [ebp - 0x500]
test edx, edx
jle 0x401719
xor esi, esi
jmp 0x4015ad
inc esi
cmp dword [ebp - 0x500], esi
jle 0x401711
test al, 1
je 0x4015a0
mov eax, dword [ebp - 0x504]
mov ebx, dword [eax + esi*4]
test ebx, ebx
je 0x401bb2
mov eax, ebx
shr eax, 0x10
je 0x401af8
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x4016d5
cmp word [ebx], 0
je 0x401bbc
lea esi, [esi]
nop
mov edx, eax
lea eax, [eax + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x401600
mov ecx, 0x224c
mov dword [ebp - 0x4fc], ebx
mov word [ebp - 0x270], cx
lea ecx, [ebp - 0x26e]
jmp 0x401663
cmp ax, 9
je 0x401878
cmp ax, 0xa
jne 0x401896
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea eax, [edx - 1]
test edx, edx
jle 0x4016a7
lea edi, [ebp - 0x14e]
cmp ecx, edi
ja 0x4016a7
mov edx, eax
add dword [ebp - 0x4fc], 2
mov eax, dword [ebp - 0x4fc]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x401860
jbe 0x401630
cmp ax, 0x22
je 0x4018f0
cmp ax, 0x5c
jne 0x401889
mov edi, 0x5c5c
add ecx, 2
lea eax, [edx - 1]
mov word [ecx - 2], di
test edx, edx
jg 0x401657
mov byte [ecx], 0x22
test eax, eax
jle 0x401bd5
mov ebx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], bx
mov byte [eax], 0
lea eax, [ebp - 0x270]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edx, eax
mov dword [esp + 0x10], edx
inc esi
mov dword [esp + 0xc], 0x40403d
mov dword [esp + 8], 0x40406c
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
movzx eax, byte [section..data]
cmp dword [ebp - 0x500], esi
jg 0x4015ad
test al, 8
jne 0x401b89
cmp dword [ebp - 0x500], 1
jle 0x401d5f
xor esi, esi
xor eax, eax
xor ecx, ecx
mov ebx, 1
mov edi, dword fs:[0x18]
mov dword [ebp - 0x518], 0
mov dword [ebp - 0x50c], edi
mov edi, eax
mov dword [ebp - 0x4fc], 0
mov dword [ebp - 0x508], esi
jmp 0x4017d9
mov edx, dword [ebp - 0x4fc]
test edx, edx
je 0x401908
mov esi, dword [ebp - 0x508]
cmp esi, edi
jg 0x4017c8
mov eax, esi
test esi, esi
je 0x401b12
add eax, eax
mov dword [ebp - 0x508], eax
shl eax, 2
test ecx, ecx
je 0x401b29
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x50c]
mov dword [esp + 8], ecx
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_HeapReAlloc]
mov ecx, eax
mov eax, dword [ebp - 0x504]
sub esp, 0x10
mov eax, dword [eax + ebx*4]
mov dword [ecx + edi*4], eax
inc edi
inc ebx
cmp dword [ebp - 0x500], ebx
je 0x40191b
mov eax, dword [ebp - 0x504]
mov eax, dword [eax + ebx*4]
cmp word [eax], 0x2f
jne 0x401760
movzx edx, word [eax + 2]
mov esi, edx
and esi, 0xffffffdf
cmp si, 0x43
je 0x401b5e
cmp dx, 0x3f
jne 0x4017cc
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 sym._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
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x401650
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x401650
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x401b81
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefwmain]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefwmain]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefwmain]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefwmain]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x401650
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x401650
mov dword [ebp - 0x4fc], eax
inc ebx
cmp dword [ebp - 0x500], ebx
jne 0x4017d9
mov eax, dword [ebp - 0x4fc]
mov dword [ebp - 0x514], edi
mov dword [ebp - 0x510], ecx
test eax, eax
je 0x401d5f
test edi, edi
jle 0x401c7f
mov edi, dword [ebp - 0x518]
mov edx, 0x404044
mov eax, 0x404046
mov dword [ebp - 0x508], 1
mov dword [ebp - 0x50c], 0
mov esi, dword [sym.imp.ucrtbase.dll_wcstok]
test edi, edi
cmovne eax, edx
mov dword [ebp - 0x504], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x500], eax
lea esi, [esi]
mov edi, dword [ebp - 0x510]
mov ebx, dword [ebp - 0x50c]
mov eax, dword [edi + ebx*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 + ebx*4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov edi, eax
cmp eax, 0xffffffff
je 0x401c20
mov eax, edi
call sym._read_line_from_handle
mov ebx, eax
test eax, eax
je 0x401aa3
lea esi, [esi]
mov eax, dword [ebp - 0x504]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
call esi
mov edx, eax
test eax, eax
jne 0x401a57
jmp 0x401a6c
mov dword [esp + 8], 0
mov dword [esp + 4], 0x404046
mov dword [esp], 0
call esi
mov edx, eax
test eax, eax
je 0x401a6c
mov eax, ebx
call sym._run_find_for_line
test eax, eax
je 0x401a38
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
mov eax, dword [ebp - 0x500]
call eax
mov eax, edi
sub esp, 0xc
call sym._read_line_from_handle
mov ebx, eax
test eax, eax
jne 0x401a10
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
inc dword [ebp - 0x50c]
mov eax, dword [ebp - 0x50c]
cmp dword [ebp - 0x514], eax
jne 0x401980
mov ecx, dword [ebp - 0x510]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x500]
call eax
sub esp, 0xc
jmp 0x40184c
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0
mov edx, eax
jmp 0x4016d5
mov dword [ebp - 0x508], 2
mov eax, 8
test ecx, ecx
jne 0x401795
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 ecx, eax
mov eax, dword [ebp - 0x504]
sub esp, 0xc
mov eax, dword [eax + ebx*4]
jmp 0x4017c8
cmp word [eax + 4], 0x3a
jne 0x4017cc
mov dword [ebp - 0x518], 1
add eax, 6
mov dword [ebp - 0x4fc], eax
jmp 0x4017cc
mov byte [ecx], al
inc ecx
jmp 0x401650
mov dword [esp + 0xc], 0x404041
mov dword [esp + 8], 0x40406c
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x401719
mov edx, str._null_
jmp 0x4016d5
mov ebx, 0x224c
mov byte [ebp - 0x26e], 0x22
lea ecx, [ebp - 0x26e]
mov word [ebp - 0x270], bx
lea eax, [ecx + 1]
jmp 0x4016c2
mov dword [esp + 0xc], str.running_find:
mov dword [esp + 8], 0x40406c
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov edx, dword [ebp - 0x500]
movzx eax, byte [section..data]
test edx, edx
jg 0x401595
jmp 0x401711
mov dword [esp], 0
lea ebx, [ebp - 0x4f8]
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 8], ebx
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], ebx
lea ebx, [ebp - 0x270]
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.user32.dll_wsprintfW]
mov eax, ebx
call sym._write_to_stdout
jmp 0x401aaf
mov dword [esp], 0xfffffff6
call dword [sym.imp.kernel32.dll_GetStdHandle]
mov esi, dword [ebp - 0x518]
mov edx, 0x404044
mov dword [ebp - 0x508], 1
sub esp, 4
mov edi, eax
mov eax, 0x404046
test esi, esi
mov esi, dword [sym.imp.ucrtbase.dll_wcstok]
cmovne eax, edx
mov dword [ebp - 0x504], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x500], eax
mov eax, edi
call sym._read_line_from_handle
mov ebx, eax
test eax, eax
je 0x401ac7
mov eax, dword [ebp - 0x504]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
call esi
mov edx, eax
test eax, eax
jne 0x401d1f
jmp 0x401d34
mov dword [esp + 8], 0
mov dword [esp + 4], 0x404046
mov dword [esp], 0
call esi
mov edx, eax
test eax, eax
je 0x401d34
mov eax, ebx
call sym._run_find_for_line
test eax, eax
je 0x401d00
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
mov eax, dword [ebp - 0x500]
call eax
sub esp, 0xc
jmp 0x401cc7
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 sym._write_to_stdout
mov dword [ebp - 0x508], 2
jmp 0x40184c