Function at 0x4014c0
Capabilities:
Get process heap flags
Get session user name

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, 0x48
mov esi, dword [ecx]
mov edi, dword [ecx + 4]
mov dword [ebp - 0x1c], 0
cmp esi, 1
jle 0x401559
movzx eax, byte [global___dbch]
test al, 1
jne 0x401680
xor ebx, ebx
jmp 0x401507
add ebx, 1
cmp esi, ebx
je 0x401551
mov edx, eax
and edx, 1
je 0x401500
mov eax, dword [edi + ebx*4]
add ebx, 1
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], 0x40402e
mov dword [esp + 0x10], eax
mov dword [esp + 8], global___func__
mov dword [esp + 4], global___dbch
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
movzx eax, byte [global___dbch]
mov edx, eax
and edx, 1
cmp esi, ebx
jne 0x401507
test dl, dl
jne 0x4016b0
lea esi, [ebp - 0x1c]
mov dword [esp + 4], 0
mov dword [esp + 8], esi
mov dword [esp], 2
call sym._GetUserNameExW_12
movzx ebx, al
sub esp, 0xc
test ebx, ebx
jne 0x40158e
mov edi, dword fs:[0x18]
cmp dword [edi + 0x34], 0xea
je 0x4015b0
test byte [0x403000], 2
jne 0x401640
mov ebx, 1
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0
add eax, eax
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
test eax, eax
je 0x401737
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], 2
mov dword [ebp - 0x2c], eax
call sym._GetUserNameExW_12
mov ecx, dword [ebp - 0x2c]
sub esp, 0xc
test al, al
jne 0x4016e0
test byte [0x403000], 2
jne 0x401701
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
call dword [sym.imp.kernel32.dll_HeapFree]
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, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.GetUserNameExW_failed__result__d__error__ld_n
mov dword [esp + 0x14], eax
mov dword [esp + 8], global___func__
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x40159b
mov dword [esp + 0xc], str.unsupported_arguments:
mov dword [esp + 8], global___func__
mov dword [esp + 4], global___dbch
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
movzx eax, byte [global___dbch]
jmp 0x4014f4
mov dword [esp + 0xc], 0x404032
mov dword [esp + 8], global___func__
mov dword [esp + 4], global___dbch
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401559
mov edx, dword [ebp - 0x1c]
mov eax, ecx
call dbg.output_write
mov edx, 2
mov eax, 0x40407c
call dbg.output_write
mov ecx, dword [ebp - 0x2c]
jmp 0x40160d
mov eax, dword [edi + 0x34]
mov dword [esp + 0xc], str.GetUserNameExW_failed__error__ld_n
mov dword [esp + 8], global___func__
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
mov dword [ebp - 0x2c], ecx
call sym._wine_dbg_log.constprop.0
mov ecx, dword [ebp - 0x2c]
jmp 0x40160d
test byte [0x403000], 2
je 0x40159b
mov dword [esp + 0xc], str.Memory_allocation_failed_n
mov ebx, 1
mov dword [esp + 8], global___func__
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x4015a0