Function at 0x401540
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 ebx, dword [ecx]
mov dword [ebp - 0x504], eax
movzx eax, byte [section..data]
mov dword [ebp - 0x500], ebx
test al, 8
jne 0x401b80
test ebx, ebx
jle 0x401bc3
xor esi, esi
jmp 0x401595
inc esi
cmp dword [ebp - 0x500], esi
je 0x4016ff
mov edx, eax
and edx, 8
je 0x401588
mov eax, dword [ebp - 0x504]
mov ebx, dword [eax + esi*4]
test ebx, ebx
je 0x401b50
mov eax, ebx
shr eax, 0x10
je 0x401a78
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 0x4016be
cmp word [ebx], 0
je 0x401b5a
lea esi, [esi]
nop
mov edx, eax
lea eax, [eax + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x4015e8
mov eax, 0x224c
mov dword [ebp - 0x4fc], ebx
lea ecx, [ebp - 0x26e]
mov word [ebp - 0x270], ax
jmp 0x401643
cmp ax, 9
je 0x401998
cmp ax, 0xa
jne 0x4019b6
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea eax, [edx - 1]
test edx, edx
jle 0x401690
lea ebx, [ebp - 0x14e]
cmp ecx, ebx
ja 0x401690
mov edx, eax
add dword [ebp - 0x4fc], 2
mov eax, dword [ebp - 0x4fc]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x401980
jbe 0x401610
cmp ax, 0x22
je 0x401a10
cmp ax, 0x5c
jne 0x4019a9
mov ebx, 0x5c5c
add ecx, 2
lea eax, [edx - 1]
mov word [ecx - 2], bx
test edx, edx
jg 0x401637
lea esi, [esi]
nop
mov byte [ecx], 0x22
test eax, eax
jle 0x401b73
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
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], 0x404043
mov dword [esp + 8], 0x404088
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 dword [ebp - 0x500], esi
jne 0x401595
test dl, dl
je 0x401727
mov dword [esp + 0xc], 0x404047
mov dword [esp + 8], 0x404088
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
cmp dword [ebp - 0x500], 1
jle 0x401bc3
xor eax, eax
mov edx, dword [ebp - 0x504]
xor ecx, ecx
xor esi, esi
mov edi, dword fs:[0x18]
mov dword [ebp - 0x4fc], 0
mov ebx, 1
mov dword [ebp - 0x508], edi
mov edi, eax
jmp 0x4017c3
cmp edi, esi
jl 0x4017b6
test esi, esi
je 0x401a28
add esi, esi
mov dword [ebp - 0x504], edx
lea eax, [esi*4]
test ecx, ecx
je 0x401a40
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x508]
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 edx, dword [ebp - 0x504]
mov ecx, eax
sub esp, 0x10
mov eax, dword [edx + ebx*4]
mov dword [ecx + edi*4], eax
inc ebx
inc edi
cmp dword [ebp - 0x500], ebx
je 0x4017e8
mov eax, dword [edx + ebx*4]
cmp word [eax], 0x2f
je 0x401b00
cmp dword [ebp - 0x4fc], 0
jne 0x401760
mov dword [ebp - 0x4fc], eax
inc ebx
cmp dword [ebp - 0x500], ebx
jne 0x4017c3
mov dword [ebp - 0x510], edi
mov dword [ebp - 0x50c], ecx
test edi, edi
jle 0x401bf2
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov ebx, 1
mov dword [ebp - 0x508], 0
mov dword [ebp - 0x500], eax
lea esi, [esi]
lea esi, [esi]
mov esi, dword [ebp - 0x50c]
mov edi, dword [ebp - 0x508]
mov eax, dword [esi + edi*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 [esi + edi*4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov esi, eax
cmp eax, 0xffffffff
je 0x401aa0
mov eax, str._r_n__________
call sym._write_to_stdout
lea eax, [ebp - 0x478]
call sym._write_to_stdout
mov eax, 0x40401e
call sym._write_to_stdout
mov eax, dword fs:[0x18]
mov dword [ebp - 0x504], eax
jmp 0x40190d
mov edx, dword [ebp - 0x4fc]
mov eax, edi
call sym._run_find_for_line
mov dword [esp + 8], edi
test eax, eax
mov eax, 0
mov dword [esp + 4], 0
cmovne ebx, eax
mov eax, dword [ebp - 0x504]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x500]
call eax
sub esp, 0xc
mov eax, esi
call sym._read_line_from_handle
mov edi, eax
test eax, eax
jne 0x4018d0
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
inc dword [ebp - 0x508]
mov eax, dword [ebp - 0x508]
cmp dword [ebp - 0x510], eax
jne 0x401820
mov ecx, dword [ebp - 0x50c]
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
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
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x401630
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x401630
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x401a98
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 0x401630
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x401630
mov dword [ebp - 0x504], edx
mov eax, 8
mov esi, 2
test ecx, ecx
jne 0x401783
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 0x4017b6
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf.constprop.0
mov edx, eax
jmp 0x4016be
mov byte [ecx], al
inc ecx
jmp 0x401630
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 sym._write_to_stdout
jmp 0x401926
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 sym._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 edx, str._null_
jmp 0x4016be
mov edx, 0x224c
mov byte [ebp - 0x26e], 0x22
lea ecx, [ebp - 0x26e]
mov word [ebp - 0x270], dx
lea eax, [ecx + 1]
jmp 0x4016ab
mov dword [esp + 0xc], str.running_find:
mov dword [esp + 8], 0x404088
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
movzx eax, byte [section..data]
mov ecx, dword [ebp - 0x500]
mov edx, eax
and edx, 8
test ecx, ecx
jg 0x40157f
jmp 0x4016ff
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 0x401b2a
mov dword [esp], 0xfffffff6
mov ebx, 1
call dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [ebp - 0x504], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 4
mov esi, dword fs:[0x18]
mov dword [ebp - 0x500], eax
jmp 0x401c5f
mov edx, dword [ebp - 0x4fc]
mov eax, edi
call sym._run_find_for_line
mov dword [esp + 8], edi
test eax, eax
mov eax, 0
mov dword [esp + 4], 0
cmovne ebx, eax
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x500]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x504]
call sym._read_line_from_handle
mov edi, eax
test eax, eax
jne 0x401c28
jmp 0x40193e