Function at 0x401546
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x824
mov edi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
xor ecx, ecx
cmp esi, 0xff
jle 0x4013a5
cmp esi, 0x1ff
jle 0x4014d5
lea eax, [esi - 0x200]
cmp eax, 0x15
ja case.0x4013b1.3
jmp dword [eax*4 + 0x40d080]
mov esi, edx
call dword [sym.imp.user32.dll_GetCapture]
cmp eax, esi
jne case.0x401905.458
mov ecx, esi
movzx eax, di
mov dword [ebp - 0x10], eax
mov esi, dword [0x41048c]
push ecx
call dword [sym.imp.user32.dll_GetDC]
mov edi, eax
lea eax, [ebp - 0x830]
mov ebx, dword [sym.imp.user32.dll_GetClientRect]
push eax
push dword [ebp + 8]
call ebx
lea eax, [esi - 2]
mov dword [ebp - 0x830], eax
add esi, 3
mov dword [ebp - 0x828], esi
lea eax, [ebp - 0x830]
push eax
push edi
call dword [sym.imp.user32.dll_InvertRect]
push edi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.user32.dll_ReleaseDC]
mov dword [0x41048c], 0xffffffff
lea eax, [ebp - 0x830]
push eax
push esi
call ebx
mov eax, dword [0x410488]
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0x10], ecx
mov edi, dword [ebp - 0x828]
mov ebx, dword [ebp - 0x824]
push 2
call dword [sym.imp.user32.dll_BeginDeferWindowPos]
mov esi, eax
mov eax, dword [0x410488]
mov ecx, dword [eax + 0x10]
lea edx, [ecx + 2]
mov dword [ebp - 0x10], edx
add ecx, 0xfffffffe
push 0x14
push ebx
push ecx
push 0
push 0
push 0
push dword [eax + 4]
push esi
call dword [sym.imp.user32.dll_DeferWindowPos]
mov ecx, dword [ebp - 0x10]
sub edi, ecx
mov eax, dword [0x410488]
push 0x14
push ebx
push edi
push 0
push ecx
push 0
push dword [eax + 8]
push esi
call dword [sym.imp.user32.dll_DeferWindowPos]
push esi
call dword [sym.imp.user32.dll_EndDeferWindowPos]
call dword [sym.imp.user32.dll_ReleaseCapture]
jmp case.0x401905.458
lea eax, [esi - 1]
cmp eax, 0x1f
ja case.default.0x4013b1
jmp dword [eax*4 + section..rdata]
mov esi, edx
push 0x248
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov dword [0x410488], eax
test eax, eax
je case.0x401905.458
add eax, 0x40
push 0x104
push eax
push 0xa0
push dword [0x411168]
call dword [sym.imp.user32.dll_LoadStringW]
mov eax, dword [0x410488]
mov dword [eax + 0x10], 0xfa
mov dword [eax], esi
mov eax, dword [0x410488]
add eax, 0x40
push 0x7d2
push eax
push esi
call sym._CreateTreeView
add esp, 0xc
mov ecx, dword [0x410488]
mov dword [ecx + 4], eax
push 0x7d3
push esi
call sym._CreateListView
add esp, 8
mov ecx, dword [0x410488]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], 1
push dword [ecx + 4]
call dword [sym.imp.user32.dll_SetFocus]
mov eax, dword [0x410488]
mov esi, dword [eax + 4]
mov dword [ebp - 0x20], 0x800
lea eax, [ebp - 0x30]
push 0
push eax
push 0
push 0x20019
push 0
push 0
push 0
push 0x40d100
push 0x80000001
call dword [sym.imp.advapi32.dll_RegCreateKeyExW]
test eax, eax
jne case.0x401905.458
lea eax, [ebp - 0x20]
lea edi, [ebp - 0x830]
push eax
push edi
push 0
push 0
push str.LastKey
push dword [ebp - 0x30]
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
test eax, eax
je 0x401b55
mov eax, dword [0x410488]
mov edi, dword [sym.imp.user32.dll_SendMessageW]
push 0
push 0
push 0x110a
push dword [eax + 4]
call edi
push eax
push 2
push 0x1102
push esi
call edi
push dword [ebp - 0x30]
call dword [sym.imp.advapi32.dll_RegCloseKey]
jmp case.0x401905.458
cmp esi, 0x100
je 0x40182d
cmp esi, 0x111
je 0x40189b
cmp esi, 0x113
je 0x401b38
jmp case.0x4013b1.3
cmp esi, 0x4e
je 0x4018d8
cmp esi, 0x7b
jne case.0x4013b1.3
movsx esi, di
sar edi, 0x10
mov eax, dword [0x410488]
cmp dword [eax + 4], ebx
je 0x4019e4
push 2
push 0xffffffffffffffff
push 0x100c
push dword [eax + 8]
call dword [sym.imp.user32.dll_SendMessageW]
xor ecx, ecx
cmp eax, 0xffffffff
sete cl
xor ecx, 3
jmp 0x401b13
lea eax, [ebp - 0x830]
push 0
push eax
push 0
push 0x20006
push 0
push 0
push 0
push 0x40d100
push 0x80000001
call dword [sym.imp.advapi32.dll_RegCreateKeyExW]
test eax, eax
jne 0x401aeb
mov eax, dword [0x410488]
mov edi, dword [sym.imp.user32.dll_SendMessageW]
push 0
push 9
push 0x110a
push dword [eax + 4]
call edi
mov esi, eax
mov eax, dword [0x410488]
push 0
push 0
push 0x110a
push dword [eax + 4]
call edi
mov ebx, eax
mov edi, dword [0x410488]
cmp esi, eax
je 0x401a9d
push 0
push esi
push dword [edi + 4]
call sym._GetItemFullPath
add esp, 0xc
mov edi, eax
jmp 0x401aa0
cmp ebx, 1
je case.0x4013b1.3
cmp dword [0x410488], 0
je case.0x4013b1.3
mov eax, edi
shr eax, 0x10
mov dword [ebp - 0x14], eax
movzx eax, di
mov dword [ebp - 0x1c], eax
push 2
call dword [sym.imp.user32.dll_BeginDeferWindowPos]
mov dword [ebp - 0x10], eax
mov eax, dword [0x410488]
mov ecx, dword [eax + 0x10]
lea edx, [ecx + 2]
mov dword [ebp - 0x18], edx
add ecx, 0xfffffffe
push 0x14
push dword [ebp - 0x14]
push ecx
push 0
push 0
push 0
push dword [eax + 4]
push dword [ebp - 0x10]
call dword [sym.imp.user32.dll_DeferWindowPos]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
sub ecx, edx
mov eax, dword [0x410488]
push 0x14
push dword [ebp - 0x14]
push ecx
push 0
push edx
push 0
push dword [eax + 8]
push dword [ebp - 0x10]
call dword [sym.imp.user32.dll_DeferWindowPos]
push dword [ebp - 0x10]
call dword [sym.imp.user32.dll_EndDeferWindowPos]
mov edx, dword [ebp + 8]
jmp case.0x4013b1.3
mov eax, dword [0x410488]
test eax, eax
je 0x401b38
xor ecx, ecx
cmp dword [eax + 0xc], 0
setne cl
jmp 0x401a6f
cmp di, 1
jne case.0x4013b1.3
lea eax, [ebp - 0x830]
push eax
call dword [sym.imp.user32.dll_GetCursorPos]
lea eax, [ebp - 0x830]
push eax
push dword [ebp + 8]
call dword [sym.imp.user32.dll_ScreenToClient]
mov eax, dword [ebp - 0x830]
mov ecx, dword [0x410488]
mov ecx, dword [ecx + 0x10]
lea edx, [ecx - 2]
cmp eax, edx
jl 0x40164c
add ecx, 3
cmp eax, ecx
jge 0x40164c
push 0x7f84
push 0
call dword [sym.imp.user32.dll_LoadCursorW]
push eax
call dword [sym.imp.user32.dll_SetCursor]
mov ecx, 1
jmp 0x401b38
mov ebx, edx
call dword [sym.imp.user32.dll_GetCapture]
cmp eax, ebx
jne case.0x401905.458
movzx esi, di
push ebx
call dword [sym.imp.user32.dll_GetDC]
mov edi, eax
lea eax, [ebp - 0x830]
push eax
push ebx
call dword [sym.imp.user32.dll_GetClientRect]
mov eax, dword [0x41048c]
lea ecx, [eax - 2]
mov dword [ebp - 0x830], ecx
add eax, 3
mov dword [ebp - 0x828], eax
mov ebx, dword [sym.imp.user32.dll_InvertRect]
lea eax, [ebp - 0x830]
push eax
push edi
call ebx
mov dword [0x41048c], esi
lea eax, [esi - 2]
mov dword [ebp - 0x830], eax
add esi, 3
mov dword [ebp - 0x828], esi
lea eax, [ebp - 0x830]
push eax
push edi
call ebx
push edi
push dword [ebp + 8]
jmp 0x401822
movsx edi, di
lea eax, [ebp - 0x30]
push eax
push edx
call dword [sym.imp.user32.dll_GetClientRect]
mov eax, dword [0x410488]
mov eax, dword [eax + 0x10]
lea esi, [eax - 2]
cmp edi, esi
jl case.0x401905.458
lea ebx, [eax + 3]
cmp edi, ebx
jge case.0x401905.458
mov dword [0x41048c], eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.user32.dll_GetDC]
mov edi, eax
lea eax, [ebp - 0x830]
push eax
push dword [ebp + 8]
call dword [sym.imp.user32.dll_GetClientRect]
mov dword [ebp - 0x830], esi
mov dword [ebp - 0x828], ebx
lea eax, [ebp - 0x830]
push eax
push edi
call dword [sym.imp.user32.dll_InvertRect]
push edi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.user32.dll_ReleaseDC]
push esi
call dword [sym.imp.user32.dll_SetCapture]
jmp case.0x401905.458
mov ebx, edx
call dword [sym.imp.user32.dll_GetCapture]
cmp eax, ebx
jne case.0x401905.458
mov esi, dword [0x41048c]
test esi, esi
js case.0x401905.458
push ebx
call dword [sym.imp.user32.dll_GetDC]
mov edi, eax
lea eax, [ebp - 0x830]
push eax
push ebx
call dword [sym.imp.user32.dll_GetClientRect]
lea eax, [esi - 2]
mov dword [ebp - 0x830], eax
add esi, 3
mov dword [ebp - 0x828], esi
lea eax, [ebp - 0x830]
push eax
push edi
call dword [sym.imp.user32.dll_InvertRect]
push edi
push ebx
call dword [sym.imp.user32.dll_ReleaseDC]
jmp case.0x401905.458
cmp ebx, 0x1b
jne 0x401b38
mov esi, edx
call dword [sym.imp.user32.dll_GetCapture]
cmp eax, esi
jne case.0x401905.458
mov edx, dword [0x41048c]
mov ecx, esi
call sym._draw_splitbar
lea eax, [ebp - 0x830]
push eax
push esi
call dword [sym.imp.user32.dll_GetClientRect]
mov ecx, dword [ebp - 0x828]
mov edx, dword [ebp - 0x824]
call sym._ResizeWnd
mov dword [0x41048c], 0xffffffff
call dword [sym.imp.user32.dll_ReleaseCapture]
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadCursorW]
push eax
call dword [sym.imp.user32.dll_SetCursor]
jmp case.0x401905.458
movzx eax, bx
cmp eax, 0x8067
je 0x401a5e
cmp eax, 0x8008
je 0x401a7e
cmp eax, 0x8002
jne case.0x4013b1.3
push edx
call dword [sym.imp.user32.dll_DestroyWindow]
jmp case.0x401905.458
push edi
push ebx
push esi
push edx
call dword [sym.imp.user32.dll_DefWindowProcW]
mov ecx, eax
jmp 0x401b38
mov eax, dword [0x410488]
cmp ebx, 0x7d2
jne 0x4019c4
test eax, eax
je 0x4019c4
mov ebx, edx
mov ecx, dword [edi + 8]
lea edx, [ecx + 0x1cc]
cmp edx, 9
ja case.default.0x401905
jmp dword [edx*4 + 0x40d0d8]
lea ecx, [ebp - 0x30]
push ecx
push 0
push dword [eax + 4]
call sym._GetItemPath
add esp, 0xc
mov esi, eax
push dword [edi + 0x1c]
push eax
push dword [ebp - 0x30]
push ebx
call sym._RenameKey
add esp, 0x10
mov ebx, eax
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x4019aa
mov dword [ebp - 0x830], 0x11
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x82c], eax
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x820], eax
mov eax, dword [0x410488]
lea ecx, [ebp - 0x830]
push ecx
push 0
push 0x113f
push dword [eax + 4]
call dword [sym.imp.user32.dll_SendMessageW]
mov eax, dword [0x410488]
lea ecx, [ebp - 0x30]
push ecx
push 0
push dword [eax + 4]
call sym._GetItemPath
add esp, 0xc
mov esi, eax
push eax
call sym._update_listview_path
add esp, 4
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
call sym._UpdateStatusBar
mov eax, dword [0x410488]
push 0
push 0xffffffffffffffeb
push dword [eax + 4]
call dword [sym.imp.user32.dll_SetWindowLongW]
mov ecx, dword [ebp - 0x10]
jmp 0x401b38
cmp ebx, 0x7d3
jne 0x401b38
test eax, eax
je 0x401b38
mov ecx, edi
call sym._listview_notify
jmp 0x401b3a
mov dword [ebp - 0x830], esi
mov dword [ebp - 0x82c], edi
lea ebx, [ebp - 0x830]
push ebx
push dword [eax + 4]
call dword [sym.imp.user32.dll_ScreenToClient]
mov eax, dword [0x410488]
push ebx
push 0
push 0x1111
push dword [eax + 4]
call dword [sym.imp.user32.dll_SendMessageW]
test eax, eax
je 0x401b0e
mov eax, dword [0x410488]
mov ebx, dword [sym.imp.user32.dll_SendMessageW]
push dword [ebp - 0x824]
push 9
push 0x110b
push dword [eax + 4]
call ebx
mov eax, dword [0x410488]
push 0
push 0
push 0x110a
push dword [eax + 4]
call ebx
xor ecx, ecx
cmp dword [ebp - 0x824], eax
setne cl
jmp 0x401b13
mov eax, dword [0x410488]
xor ecx, ecx
cmp dword [eax + 0xc], 0
sete cl
mov dword [eax + 0xc], ecx
push dword [eax + ecx*4 + 4]
call dword [sym.imp.user32.dll_SetFocus]
jmp case.0x401905.458
test byte [section..data], 8
je 0x401b38
sub esp, 0x10
call sym._wine_dbg_log
xor ecx, ecx
add esp, 0x10
jmp 0x401b38
add edi, 0x40
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [edi + eax], 0
lea eax, [eax + 2]
jne 0x401ab0
push eax
push edi
push 1
push 0
push str.LastKey
push dword [ebp - 0x830]
call dword [sym.imp.advapi32.dll_RegSetValueExW]
cmp esi, ebx
je 0x401adf
push edi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
push dword [ebp - 0x830]
call dword [sym.imp.advapi32.dll_RegCloseKey]
push dword [0x410488]
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov dword [0x410488], 0
push 0
call dword [sym.imp.user32.dll_PostQuitMessage]
jmp case.0x401905.458
mov ecx, 0xffffffff
mov ebx, dword [0x41116c]
push ecx
push dword [0x41101c]
call dword [sym.imp.user32.dll_GetSubMenu]
push 0
push ebx
push 0
push edi
push esi
push 2
push eax
call dword [sym.imp.user32.dll_TrackPopupMenu]
xor ecx, ecx
mov eax, ecx
add esp, 0x824
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
cmp ecx, 0xfffffff9
jne case.0x401905.458
mov dword [eax + 0xc], 0
jmp case.0x401905.458
mov eax, dword [0x410488]
add eax, 0x40
push eax
push edi
call dword [sym.imp.kernel32.dll_lstrcmpW]
test eax, eax
je 0x4014a3
push edi
push esi
call sym._FindPathInTree
add esp, 8
test eax, eax
je 0x4014a3
push eax
push 9
push 0x110b
push esi
call dword [sym.imp.user32.dll_SendMessageW]
jmp 0x4014c7
push 0xffffffffffffffeb
push dword [eax + 4]
call dword [sym.imp.user32.dll_GetWindowLongW]
mov ecx, 1
test eax, eax
je 0x401b38
mov eax, dword [0x410488]
lea ecx, [ebp - 0x830]
push ecx
push 0
push dword [eax + 4]
call sym._GetItemPath
mov ecx, 1
add esp, 0xc
test eax, eax
je 0x401b38
xor ecx, ecx
cmp word [eax], 0
sete cl
jmp 0x401b38
push edi
push dword [eax + 4]
call sym._OnTreeExpanding
add esp, 8
xor ecx, ecx
test eax, eax
sete cl
jmp 0x401b38
mov esi, dword [edi + 0x3c]
mov ebx, dword [eax + 4]
mov edi, dword [eax + 8]
mov dword [ebp - 0x830], 0
push 0
push 0
push 0x110a
push ebx
call dword [sym.imp.user32.dll_SendMessageW]
cmp esi, eax
je 0x401c4b
lea eax, [ebp - 0x830]
push eax
push esi
push ebx
call sym._GetItemPath
add esp, 0xc
mov esi, eax
push 0
push eax
push dword [ebp - 0x830]
push edi
call sym._RefreshListView
add esp, 0x10
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
jmp 0x401c5b
push 0
push 0
push 0x1009
push edi
call dword [sym.imp.user32.dll_SendMessageW]
call sym._UpdateStatusBar
jmp case.0x401905.458