Function at 0x587f04
Capabilities:
Hide graphical window
Terminate process

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x6bddd9
call fcn.00651da4
sub esp, 0x48
cmp dword [0x7f9cc8], 0
push ebx
mov ebx, ecx
mov dword [ebp + 0x40], ebx
je 0x587f33
mov ecx, dword [0x7f9ccc]
test ecx, ecx
je 0x587f33
call fcn.005c2dd5
mov ecx, dword [0x7d4b00]
test ecx, ecx
setne al
test al, al
je 0x587f49
push 0
call fcn.005fdc6d
cmp dword [ebp + 0x64], 0
mov eax, dword [ebp + 0x64]
jne 0x587f57
mov eax, 0x756a0c
push eax
push str.DoDestroy__s
call fcn.0040e854
add esp, 8
call fcn.005a8530
call fcn.0048543e
call fcn.0047b037
test al, al
jne 0x588713
push esi
push edi
lea ecx, [ebx + 0xa8]
mov byte [0x7c2955], al
call fcn.005df7b3
lea ecx, [ebx + 0xb8]
call fcn.005df7b3
lea ecx, [ebx + 0xc8]
call fcn.005df7b3
lea ecx, [ebx + 0xd8]
call fcn.005df7b3
lea ecx, [ebx + 0xe8]
call fcn.005df7b3
lea ecx, [ebx + 0xf8]
call fcn.005df7b3
call fcn.0056e33a
mov ecx, eax
call fcn.0056de7a
call fcn.00570508
call fcn.004a3c96
mov esi, dword [eax + 4]
mov edi, esi
jmp 0x587fea
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
call dword [eax + 8]
mov esi, dword [esi]
cmp esi, edi
jne 0x587fe2
xor eax, eax
mov dword [ebp], fcn.0043b3cd
mov dword [ebp + 4], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], eax
push dword [ebp + 0x64]
lea ecx, [ebp + 0x10]
mov dword [ebp - 4], eax
call fcn.0040f49f
push 0x6de5a8
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 1
call fcn.0040f49f
lea eax, [ebp + 0x10]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp + 0x44]
push eax
lea ecx, [ebp]
call fcn.0043716a
xor edi, edi
lea ecx, [ebp + 0x44]
push 0
inc edi
push edi
call fcn.0040facf
push 0
push edi
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0
call fcn.0040facf
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp]
call fcn.0043b4a0
push str.ShutdownBegin
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 3
call fcn.0040f49f
push edi
push 0
push 0
lea eax, [ebp + 0x44]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x54]
push eax
push 0x1e
call fcn.004857ae
push 0
push edi
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 3
call fcn.0040facf
push dword [0x7d4820]
call dword [sym.imp.USER32.dll_IsIconic]
push dword [0x7d4820]
test eax, eax
setne byte [ebp + 0x28]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
setne byte [ebp + 0x2c]
call fcn.0047b05b
cmp byte [0x7c2399], 0
je 0x588145
push str.Helper_shutdown
lea ecx, [ebp + 0x44]
call fcn.0040f49f
push 0x1f4
mov ecx, 0x7c6d20
mov byte [ebp - 4], 5
call fcn.0050106e
mov esi, str.succeeded
test al, al
jne 0x5880f6
mov esi, str.failed
push esi
call fcn.0040f6ae
pop ecx
push eax
push esi
lea ecx, [ebp + 0x44]
call fcn.0040f612
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
jae 0x588113
lea eax, [ebp + 0x44]
push eax
push 0x6e1fd8
call fcn.0040e561
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
pop ecx
pop ecx
jae 0x58812c
lea eax, [ebp + 0x44]
push eax
push 0x10
call fcn.00485bac
pop ecx
pop ecx
push 0
push edi
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 3
call fcn.0040facf
call fcn.005bb0f0
mov eax, dword [0x7f9ccc]
push edi
push dword [eax + 4]
call fcn.0058c407
cmp byte [0x7c247d], 0
mov ecx, ebx
je 0x588173
push 4
call fcn.0058762d
mov byte [0x7c247d], 0
jmp 0x58817d
push 0x200
call fcn.0058762d
mov ecx, ebx
call fcn.00587d3d
call fcn.005fcf59
lea ecx, [ebx + 0x78]
call fcn.0059e992
mov ecx, ebx
call fcn.0058c1d5
push edi
call fcn.004bec8d
mov byte [ebp + 0x67], 1
call fcn.00475363
mov ecx, dword [0x7c63f0]
mov byte [ebp - 4], 6
mov eax, dword [ecx]
call dword [eax + 0x64]
mov eax, dword [0x7c9a38]
or byte [eax + 0x28], 1
mov eax, dword [0x7c9a3c]
test eax, eax
je 0x5881cc
or byte [eax + 0x28], 1
mov eax, dword [0x7c9a40]
or byte [eax + 0x1c], 1
mov eax, dword [0x7c9a44]
test eax, eax
je 0x5881e2
or byte [eax + 0x1c], 1
mov ecx, dword [0x7c7778]
test ecx, ecx
je 0x5881f3
push 1
call fcn.004759f6
mov ecx, dword [0x7c777c]
test ecx, ecx
je 0x588204
push 1
call fcn.004759f6
mov byte [ebp - 4], 7
call fcn.004753a4
push 0
push dword [ebx + 4]
mov byte [ebp - 4], 3
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [0x7d4808]
test esi, esi
je 0x588241
mov ecx, esi
call fcn.005e8ed0
push 0xb4
push esi
call fcn.00651dc4
and dword [0x7d4808], 0
pop ecx
pop ecx
mov ecx, dword [ebx + 0x70]
test ecx, ecx
je 0x588257
and dword [ebx + 0x70], 0
test ecx, ecx
je 0x588257
mov eax, dword [ecx]
push 1
call dword [eax + 0x14]
xor esi, esi
mov edi, 0x7d49ec
cmp dword [0x7d49fc], esi
jbe 0x588284
push esi
mov ecx, edi
call fcn.004245d6
mov ecx, dword [eax]
test ecx, ecx
je 0x58827b
push 1
call fcn.00586c96
inc esi
cmp esi, dword [0x7d49fc]
jb 0x588266
mov ecx, edi
call fcn.0048e4b6
call fcn.0057ab0c
mov esi, dword [ebp + 0x40]
xor edi, edi
xor bl, bl
call fcn.0048a544
mov ecx, dword [0x79eb70]
inc edi
mov dword [ebp + 0x40], eax
mov dword [ebp + 0x64], eax
mov dword [ebp + 0x3c], edi
test ecx, ecx
je 0x5882ce
imul eax, ecx, 0x3e8
push 0x32
pop ecx
cdq
idiv ecx
cmp edi, eax
jl 0x5882cb
mov eax, dword [ebp + 0x40]
and eax, 0xfffffff7
mov dword [ebp + 0x64], eax
jmp 0x5882ce
mov eax, dword [ebp + 0x64]
cmp byte [0x7c2399], 0
je 0x5882ed
mov ecx, 0x7c6d20
call fcn.004feca0
test eax, eax
mov eax, dword [ebp + 0x64]
je 0x5882ed
or eax, 0x10
jmp 0x5882f0
and eax, 0xffffffef
cmp byte [0x79eb69], 0
mov dword [ebp + 0x64], eax
je 0x58831a
cmp edi, 0xc8
jl 0x588309
cmp eax, 1
je 0x588322
cmp edi, 0x12c
jl 0x588326
test eax, 0xffffffee
jne 0x588326
jmp 0x588322
cmp edi, 0xc8
jl 0x588326
and dword [ebp + 0x64], 0
test byte [ebp + 0x40], 2
jne 0x588349
test bl, bl
jne 0x588349
push 1
call fcn.0058d39b
push dword [esi + 4]
lea ebx, [eax - 1]
neg bl
sbb bl, bl
inc bl
call dword [sym.imp.USER32.dll_DestroyWindow]
cmp dword [ebp + 0x64], 0
je 0x58852c
mov eax, edi
mov ecx, 0x4b0
cdq
idiv ecx
test edx, edx
jne 0x58851d
and dword [ebp + 0x54], edx
mov dword [ebp + 0x58], 0xf
mov byte [ebp + 0x44], dl
mov edi, str.Shutdown_pending:
mov byte [ebp - 4], 8
push edi
call fcn.0040f6ae
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f612
test byte [ebp + 0x64], 1
mov edi, 0x720154
jne 0x58839c
mov edi, 0x756a0c
push edi
call fcn.0040f6ae
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f612
test byte [ebp + 0x64], 2
mov edi, str.DiskIO
jne 0x5883bd
mov edi, 0x756a0c
push edi
call fcn.0040f6ae
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f612
test byte [ebp + 0x64], 4
mov edi, str.DelTorrents
jne 0x5883de
mov edi, 0x756a0c
push edi
call fcn.0040f6ae
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f612
test byte [ebp + 0x64], 8
mov edi, str.UPnP
jne 0x5883ff
mov edi, 0x756a0c
push edi
call fcn.0040f6ae
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f612
test byte [ebp + 0x64], 0x10
mov edi, 0x720180
jne 0x588420
mov edi, 0x756a0c
push edi
call fcn.0040f6ae
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f612
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
jae 0x58843d
lea eax, [ebp + 0x44]
push eax
call fcn.0040e561
mov dword [esp], 0x7570e4
call fcn.0040e561
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
pop ecx
jae 0x58845c
lea eax, [ebp + 0x44]
push eax
push 0x10
call fcn.00485bac
xor eax, eax
mov dword [ebp + 0x18], 0x6d207c
pop ecx
pop ecx
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x20], eax
mov dword [ebp + 0x24], eax
push 0x6de5a8
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 9
call fcn.0040f49f
lea eax, [ebp + 0x44]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp + 0x18]
call fcn.0043716a
push 0
push 1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 9
call fcn.0040facf
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp + 0x18]
call fcn.0043b4a0
push str.ShutdownPending
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xb
call fcn.0040f49f
push 1
push 0
push 0
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0x24]
push eax
push 0x1e
call fcn.004857ae
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040facf
push 0
push 1
lea ecx, [ebp - 0x24]
call fcn.0040facf
lea ecx, [ebp + 0x1c]
call fcn.0043603c
push 0
push 1
lea ecx, [ebp + 0x44]
mov dword [ebp + 0x18], 0x6d2044
mov byte [ebp - 4], 3
call fcn.0040facf
mov edi, dword [ebp + 0x3c]
push 0x32
pop eax
push eax
call dword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x588297
xor eax, eax
push eax
push eax
push eax
push 0xa
call fcn.0050758d
test eax, eax
je 0x588541
add eax, 0xc
jmp 0x588543
xor eax, eax
push 0
push eax
call fcn.0050905f
test bl, bl
jne 0x58855f
push 0
call fcn.0058d39b
lea ebx, [eax - 1]
neg bl
sbb bl, bl
inc bl
lea eax, [ebp + 0x38]
push eax
lea eax, [ebp + 0x34]
push eax
lea eax, [ebp + 0x30]
push eax
call fcn.00491012
call fcn.00490f14
mov esi, eax
call fcn.00490ec8
mov edi, eax
call fcn.00490e12
cmp dword [eax + 0x14], 0x10
jb 0x58858b
mov eax, dword [eax]
push edi
push esi
push dword [ebp + 0x38]
push dword [ebp + 0x34]
push dword [ebp + 0x30]
push eax
lea eax, [ebp - 0x24]
push str._action_:__s._d._d._02d._d._05d_
push eax
call fcn.00461fef
add esp, 0x20
lea ecx, [ebp - 0x54]
push eax
call fcn.0040f0f2
push 0
push 1
lea ecx, [ebp - 0x24]
call fcn.0040facf
xor eax, eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.DLL_CreateEventW]
push str.ShutdownDone
lea ecx, [ebp - 0x24]
mov esi, eax
call fcn.0040f49f
push 1
push esi
push 0x42fbf9
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x54]
push eax
push 0x1e
call fcn.004857ae
push 0
push 1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.0040facf
push 0x1388
push esi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
sete cl
test cl, cl
mov ecx, str.SENT
jne 0x588622
mov ecx, 0x7201d4
push eax
push ecx
push str.ShutdownDone__s_with_wait_result__d.
call fcn.0040e854
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
call fcn.004a3c96
mov esi, dword [eax + 4]
mov edi, esi
jmp 0x58864c
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, dword [esi]
cmp esi, edi
jne 0x588644
pop edi
pop esi
test bl, bl
jne 0x588667
xor ebx, ebx
mov ecx, 0x7c6f68
push ebx
call fcn.0050dec4
jmp 0x588669
xor ebx, ebx
mov byte [ebp + 0x67], 1
call fcn.00475363
mov ecx, dword [0x7c9a38]
push ebx
mov byte [ebp - 4], 0xe
call fcn.004759f6
mov ecx, dword [0x7c9a3c]
test ecx, ecx
je 0x588692
push ebx
call fcn.004759f6
mov ecx, dword [0x7c9a40]
push ebx
call fcn.004759f6
mov ecx, dword [0x7c9a44]
test ecx, ecx
je 0x5886ae
push ebx
call fcn.004759f6
mov byte [ebp - 4], 0xf
call fcn.004753a4
mov byte [ebp - 4], 3
call fcn.00485461
cmp byte [ebp + 0x68], 0
je 0x5886e9
push dword [0x7d4830]
call dword [sym.imp.KERNEL32.DLL_ReleaseMutex]
push dword [0x7d4830]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
call fcn.005a7018
push ebx
push 0x107
call fcn.0048a0d5
cmp byte [ebp + 0x6c], 0
push ebx
je 0x588701
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push 1
lea ecx, [ebp - 0x54]
call fcn.0040facf
lea ecx, [ebp + 4]
call fcn.0043603c
mov ecx, dword [ebp - 0xc]
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x5c]
pop ebp
ret 0xc