Function at 0x405340
Capabilities:
Shutdown system

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, 0x148
mov eax, dword [ecx]
mov esi, dword [ecx + 4]
mov edx, dword [ecx + 8]
mov edi, dword [ecx + 0xc]
mov dword [ebp - 0xfc], eax
test byte [0x412024], 8
jne 0x405420
cmp esi, 0x20
ja 0x405390
cmp esi, 0xe
jbe case.0x405387.17
lea eax, [esi - 0xf]
cmp eax, 0x11
ja case.0x405387.17
jmp dword [eax*4 + 0x41348c]
cmp esi, 0x203
je 0x405850
jbe 0x4053c8
cmp esi, 0x210
jne case.0x405387.17
mov dword [esp + 4], edx
xor ebx, ebx
mov dword [esp], edi
call sym._handle_parent_notify
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov ebx, 1
cmp esi, 0x84
je 0x4053b4
cmp esi, 0x112
jne case.0x405387.17
mov eax, edx
and eax, 0xfff0
cmp eax, 0xf060
je 0x4059d8
mov eax, dword [ebp - 0xfc]
mov dword [esp + 0xc], edi
mov dword [esp + 4], esi
mov dword [esp + 8], edx
mov dword [esp], eax
call dword [0x41c208]
sub esp, 0x10
lea esp, [ebp - 0x10]
mov ebx, eax
pop ecx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.got_msg__04x_wp__Ix_lp__Ix_n
mov dword [esp + 8], str.desktop_wnd_proc
mov dword [esp + 4], 0x412024
mov dword [esp], 3
mov dword [ebp - 0x100], edx
call sym._wine_dbg_log.constprop.0_1
mov edx, dword [ebp - 0x100]
jmp 0x405375
lea eax, [ebp - 0xb4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xfc]
mov dword [esp], eax
call dword [sym.imp.user32.dll_BeginPaint]
mov ecx, dword [0x412020]
sub esp, 8
test ecx, ecx
jne 0x4055ce
mov edx, dword [ebp - 0xb0]
test edx, edx
jne 0x405a30
mov eax, dword [ebp - 0xac]
mov edi, dword [ebp - 0xb4]
lea ebx, [ebp - 0x74]
xor esi, esi
mov dword [esp + 4], 0xffffff
mov dword [ebp - 0xf4], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x104], edi
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0xa4]
mov dword [esp], edi
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0xe8], eax
mov eax, dword [sym.imp.gdi32.dll_SetTextColor]
mov dword [ebp - 0x11c], eax
call eax
mov dword [ebp - 0x108], eax
mov eax, dword [sym.imp.gdi32.dll_SetBkMode]
sub esp, 8
mov dword [esp + 4], 1
mov dword [esp], edi
mov dword [ebp - 0x118], eax
call eax
sub esp, 8
mov dword [ebp - 0x10c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x5c
mov dword [esp], 0x1f
call dword [sym.imp.user32.dll_SystemParametersInfoW]
sub esp, 0x10
mov dword [esp], ebx
call dword [sym.imp.gdi32.dll_CreateFontIndirectW]
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [sym.imp.gdi32.dll_SelectObject]
mov dword [esp], edi
mov dword [ebp - 0x114], eax
call eax
mov dword [ebp - 0x110], eax
mov eax, dword [0x41c25c]
sub esp, 8
test eax, eax
jne 0x40574a
lea esi, [esi]
mov edi, dword [ebp - 0x104]
mov eax, dword [ebp - 0x110]
mov dword [esp], edi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x114]
call eax
mov eax, dword [ebp - 0x108]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x11c]
mov dword [esp], edi
call eax
mov eax, dword [ebp - 0x10c]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x118]
mov dword [esp], edi
call eax
sub esp, 8
lea eax, [ebp - 0xb4]
xor ebx, ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xfc]
mov dword [esp], eax
call dword [sym.imp.user32.dll_EndPaint]
mov eax, ebx
sub esp, 8
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov dword [esp], 0
xor ebx, ebx
call dword [sym.imp.user32.dll_PostQuitMessage]
mov eax, ebx
sub esp, 4
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov esi, dword [0x412020]
mov ebx, 1
test esi, esi
jne 0x4053b4
mov dword [esp], edx
call dword [sym.imp.user32.dll_PaintDesktop]
sub esp, 4
jmp 0x4053b4
cmp edx, 0x14
je 0x405a00
xor ebx, ebx
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov dword [esp + 4], 0x7f00
mov dword [esp], 0
call dword [sym.imp.user32.dll_LoadCursorA]
sub esp, 8
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetCursor]
sub esp, 4
lea esp, [ebp - 0x10]
mov ebx, eax
pop ecx
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov eax, dword [0x41c284]
mov dword [esp + 0x20], 0xb
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], eax
mov eax, dword [0x41c288]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
mov eax, dword [0x41c260]
mov eax, dword [eax + esi*4]
mov eax, dword [eax + 4]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xd0]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xd4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x104]
mov dword [esp], eax
call dword [sym.imp.user32.dll_DrawIconEx]
sub esp, 0x24
lea eax, [ebp - 0xf4]
mov dword [esp + 8], eax
lea eax, [ebp - 0xc4]
mov dword [esp + 4], eax
lea eax, [ebp - 0xe4]
mov dword [esp], eax
call dword [sym.imp.user32.dll_IntersectRect]
sub esp, 0xc
test eax, eax
jne 0x405810
inc esi
cmp esi, dword [0x41c25c]
jae 0x405580
mov eax, esi
xor edx, edx
mov ecx, dword [0x41c268]
mov ebx, dword [0x41c280]
div dword [0x41c264]
mov edi, dword [0x41c288]
imul edx, ecx
imul eax, ecx
mov ecx, dword [0x41c27c]
add ebx, edx
add edx, dword [0x41c270]
add edi, ebx
mov dword [ebp - 0xd4], ebx
add ecx, eax
mov ebx, dword [0x41c274]
mov dword [ebp - 0x100], edi
mov edi, dword [0x41c284]
add eax, dword [0x41c26c]
mov dword [ebp - 0xd0], ecx
add edi, ecx
mov dword [ebp - 0xc0], eax
add ebx, eax
mov ecx, dword [0x41c278]
lea eax, [ebp - 0xf4]
mov dword [ebp - 0xc8], edi
mov edi, dword [ebp - 0x100]
mov dword [esp + 8], eax
lea eax, [ebp - 0xd4]
add ecx, edx
mov dword [esp + 4], eax
lea eax, [ebp - 0xe4]
mov dword [ebp - 0xcc], edi
mov dword [ebp - 0xc4], edx
mov dword [ebp - 0xbc], ecx
mov dword [ebp - 0xb8], ebx
mov dword [esp], eax
call dword [sym.imp.user32.dll_IntersectRect]
sub esp, 0xc
test eax, eax
je 0x40570f
jmp 0x4056b0
lea eax, [ebp - 0xc4]
mov dword [esp + 0x10], 0xa011
mov dword [esp + 0xc], eax
mov eax, dword [0x41c260]
mov dword [esp + 8], 0xffffffff
mov eax, dword [eax + esi*4]
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x104]
mov dword [esp], eax
call dword [sym.imp.user32.dll_DrawTextW]
sub esp, 0x14
jmp 0x40573d
mov ebx, dword [0x412020]
test ebx, ebx
jne 0x405659
mov edx, edi
movsx eax, di
mov edi, dword [0x41c25c]
mov dword [ebp - 0xfc], eax
sar edx, 0x10
test edi, edi
je 0x4053b4
mov esi, dword [0x41c268]
mov eax, edx
mov dword [ebp - 0x100], edx
cdq
mov ecx, dword [0x41c264]
idiv esi
mov edx, eax
mov eax, dword [ebp - 0xfc]
imul edx, ecx
mov dword [ebp - 0x104], edx
cdq
idiv esi
mov edx, dword [ebp - 0x104]
add edx, eax
mov dword [ebp - 0x10c], edx
cmp edi, edx
jbe 0x4053b4
mov eax, edx
xor edx, edx
mov edi, dword [0x41c27c]
div ecx
mov ecx, dword [0x41c280]
imul edx, esi
imul esi, eax
mov eax, dword [0x41c278]
add ecx, edx
add edx, dword [0x41c270]
add eax, edx
add edi, esi
mov dword [ebp - 0x108], eax
mov eax, dword [0x41c26c]
mov dword [ebp - 0x110], eax
mov eax, dword [0x41c274]
mov dword [ebp - 0x114], eax
mov eax, dword [0x41c288]
add eax, ecx
cmp dword [ebp - 0xfc], eax
setg byte [ebp - 0x104]
cmp dword [ebp - 0xfc], ecx
setl al
cmp dword [ebp - 0x100], edi
setl cl
or eax, ecx
movzx ecx, byte [ebp - 0x104]
or cl, al
jne 0x405941
add edi, dword [0x41c284]
cmp dword [ebp - 0x100], edi
jle 0x405981
mov eax, dword [ebp - 0xfc]
cmp eax, edx
jl 0x4053b4
mov edi, dword [ebp - 0x108]
cmp eax, edi
jg 0x4053b4
mov eax, dword [ebp - 0x110]
mov edi, dword [ebp - 0x100]
add eax, esi
cmp edi, eax
jl 0x4053b4
add eax, dword [ebp - 0x114]
cmp edi, eax
jg 0x4053b4
mov eax, dword [0x41c260]
mov edi, dword [ebp - 0x10c]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x405659
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov eax, dword [eax]
mov dword [esp + 4], str.open
mov dword [esp + 8], eax
mov dword [esp], 0
call dword [0x41d5e8]
sub esp, 0x18
jmp 0x4053b4
mov dword [esp + 4], 0xffffffff
xor ebx, ebx
mov dword [esp], 0
call dword [sym.imp.user32.dll_ExitWindowsEx]
sub esp, 8
jmp 0x4053b4
mov dword [esp + 0xc], 0
xor ebx, ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x14
call dword [sym.imp.user32.dll_SystemParametersInfoW]
sub esp, 0x10
jmp 0x40565b
mov eax, dword [ebp - 0xb4]
mov dword [esp], eax
call dword [sym.imp.user32.dll_PaintDesktop]
sub esp, 4
jmp 0x4054a0