Function at 0x57b6b3
Capabilities:
Hide graphical window
Terminate process

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x6a4ee1
call fcn.006375a8
sub esp, 0x48
cmp dword [0x7d3ed8], 0
push ebx
mov ebx, ecx
mov dword [ebp + 0x40], ebx
je 0x57b6e2
mov ecx, dword [0x7d3ef4]
test ecx, ecx
je 0x57b6e2
call fcn.005ae41b
cmp dword [ebp + 0x64], 0
mov eax, dword [ebp + 0x64]
jne 0x57b6f0
mov eax, 0x73938c
push eax
push str.DoDestroy__s
call fcn.0040c884
add esp, 8
call fcn.00485740
call fcn.0047b316
test al, al
jne 0x57be91
push esi
push edi
lea ecx, [ebx + 0xa4]
mov byte [0x7a0039], al
call fcn.005d2004
lea ecx, [ebx + 0xb4]
call fcn.005d2004
lea ecx, [ebx + 0xc4]
call fcn.005d2004
lea ecx, [ebx + 0xd4]
call fcn.005d2004
lea ecx, [ebx + 0xe4]
call fcn.005d2004
lea ecx, [ebx + 0xf4]
call fcn.005d2004
call fcn.004a3ee5
mov esi, dword [eax + 4]
mov edi, esi
jmp 0x57b76d
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
call dword [eax + 8]
mov esi, dword [esi]
cmp esi, edi
jne 0x57b765
xor eax, eax
mov dword [ebp], 0x6b6dbc
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.0040d4cf
push 0x6c4228
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 1
call fcn.0040d4cf
lea eax, [ebp + 0x10]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp + 0x44]
push eax
lea ecx, [ebp]
call fcn.004383c1
xor edi, edi
lea ecx, [ebp + 0x44]
push 0
inc edi
push edi
call fcn.0040daff
push 0
push edi
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0
call fcn.0040daff
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp]
call fcn.0043ea6a
push str.ShutdownBegin
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 3
call fcn.0040d4cf
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.00485ab0
push 0
push edi
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 3
call fcn.0040daff
push dword [0x7b0818]
call dword [sym.imp.USER32.dll_IsIconic]
push dword [0x7b0818]
test eax, eax
setne byte [ebp + 0x28]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
setne byte [ebp + 0x2c]
call fcn.0047b33a
cmp byte [0x79fa85], 0
je 0x57b8c8
push str.Helper_shutdown
lea ecx, [ebp + 0x44]
call fcn.0040d4cf
push 0x1f4
mov ecx, 0x7a43e0
mov byte [ebp - 4], 5
call fcn.00500871
mov esi, str.succeeded
test al, al
jne 0x57b879
mov esi, str.failed
push esi
call fcn.0040d6de
pop ecx
push eax
push esi
lea ecx, [ebp + 0x44]
call fcn.0040d642
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
jae 0x57b896
lea eax, [ebp + 0x44]
push eax
push 0x6c7b18
call fcn.0040c591
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
pop ecx
pop ecx
jae 0x57b8af
lea eax, [ebp + 0x44]
push eax
push 0x10
call fcn.00485eae
pop ecx
pop ecx
push 0
push edi
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 3
call fcn.0040daff
mov eax, dword [0x7d3ef4]
push edi
push dword [eax + 4]
call fcn.0057fa95
cmp byte [0x79fb61], 0
mov ecx, ebx
je 0x57b8f1
push 4
call fcn.0057add8
mov byte [0x79fb61], 0
jmp 0x57b8fb
push 0x200
call fcn.0057add8
mov ecx, ebx
call fcn.0057b4e1
call fcn.005e1d7c
lea ecx, [ebx + 0x74]
call fcn.0059051c
mov ecx, ebx
call fcn.0057f87e
push edi
call fcn.004be71f
mov byte [ebp + 0x67], 1
call fcn.00475cf1
mov ecx, dword [0x7a3ad8]
mov byte [ebp - 4], 6
mov eax, dword [ecx]
call dword [eax + 0x64]
mov eax, dword [0x7a7060]
or byte [eax + 0x28], 1
mov eax, dword [0x7a7064]
test eax, eax
je 0x57b94a
or byte [eax + 0x28], 1
mov eax, dword [0x7a7068]
or byte [eax + 0x1c], 1
mov eax, dword [0x7a706c]
test eax, eax
je 0x57b960
or byte [eax + 0x1c], 1
mov ecx, dword [0x7a4e20]
test ecx, ecx
je 0x57b971
push 1
call fcn.0047627a
mov ecx, dword [0x7a4e24]
test ecx, ecx
je 0x57b982
push 1
call fcn.0047627a
mov byte [ebp - 4], 7
call fcn.00475d32
push 0
push dword [ebx + 4]
mov byte [ebp - 4], 3
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [0x7b0950]
test esi, esi
je 0x57b9bf
mov ecx, esi
call fcn.005d2464
push 0x9c
push esi
call fcn.006375c8
and dword [0x7b0950], 0
pop ecx
pop ecx
mov ecx, dword [ebx + 0x6c]
test ecx, ecx
je 0x57b9d5
and dword [ebx + 0x6c], 0
test ecx, ecx
je 0x57b9d5
mov eax, dword [ecx]
push 1
call dword [eax + 0x14]
xor esi, esi
mov edi, 0x7b0a68
cmp dword [0x7b0a78], esi
jbe 0x57ba02
push esi
mov ecx, edi
call fcn.00422606
mov ecx, dword [eax]
test ecx, ecx
je 0x57b9f9
push 1
call fcn.0057a441
inc esi
cmp esi, dword [0x7b0a78]
jb 0x57b9e4
mov ecx, edi
call fcn.004ea1a2
call fcn.0068ce38
mov esi, dword [ebp + 0x40]
xor edi, edi
xor bl, bl
call fcn.0048aa7e
mov ecx, dword [0x77d918]
inc edi
mov dword [ebp + 0x40], eax
mov dword [ebp + 0x64], eax
mov dword [ebp + 0x3c], edi
test ecx, ecx
je 0x57ba4c
imul eax, ecx, 0x3e8
push 0x32
pop ecx
cdq
idiv ecx
cmp edi, eax
jl 0x57ba49
mov eax, dword [ebp + 0x40]
and eax, 0xfffffff7
mov dword [ebp + 0x64], eax
jmp 0x57ba4c
mov eax, dword [ebp + 0x64]
cmp byte [0x79fa85], 0
je 0x57ba6b
mov ecx, 0x7a43e0
call fcn.004fe8c5
test eax, eax
mov eax, dword [ebp + 0x64]
je 0x57ba6b
or eax, 0x10
jmp 0x57ba6e
and eax, 0xffffffef
cmp byte [0x77d911], 0
mov dword [ebp + 0x64], eax
je 0x57ba98
cmp edi, 0xc8
jl 0x57ba87
cmp eax, 1
je 0x57baa0
cmp edi, 0x12c
jl 0x57baa4
test eax, 0xffffffee
jne 0x57baa4
jmp 0x57baa0
cmp edi, 0xc8
jl 0x57baa4
and dword [ebp + 0x64], 0
test byte [ebp + 0x40], 2
jne 0x57bac7
test bl, bl
jne 0x57bac7
push 1
call fcn.00580a29
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 0x57bcaa
mov eax, edi
mov ecx, 0x4b0
cdq
idiv ecx
test edx, edx
jne 0x57bc9b
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.0040d6de
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040d642
test byte [ebp + 0x64], 1
mov edi, 0x704470
jne 0x57bb1a
mov edi, 0x73938c
push edi
call fcn.0040d6de
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040d642
test byte [ebp + 0x64], 2
mov edi, str.DiskIO
jne 0x57bb3b
mov edi, 0x73938c
push edi
call fcn.0040d6de
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040d642
test byte [ebp + 0x64], 4
mov edi, str.DelTorrents
jne 0x57bb5c
mov edi, 0x73938c
push edi
call fcn.0040d6de
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040d642
test byte [ebp + 0x64], 8
mov edi, str.UPnP
jne 0x57bb7d
mov edi, 0x73938c
push edi
call fcn.0040d6de
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040d642
test byte [ebp + 0x64], 0x10
mov edi, str.Helper
jne 0x57bb9e
mov edi, 0x73938c
push edi
call fcn.0040d6de
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040d642
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
jae 0x57bbbb
lea eax, [ebp + 0x44]
push eax
call fcn.0040c591
mov dword [esp], 0x739a64
call fcn.0040c591
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
pop ecx
jae 0x57bbda
lea eax, [ebp + 0x44]
push eax
push 0x10
call fcn.00485eae
xor eax, eax
mov dword [ebp + 0x18], 0x6b6dbc
pop ecx
pop ecx
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x20], eax
mov dword [ebp + 0x24], eax
push 0x6c4228
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 9
call fcn.0040d4cf
lea eax, [ebp + 0x44]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp + 0x18]
call fcn.004383c1
push 0
push 1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 9
call fcn.0040daff
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp + 0x18]
call fcn.0043ea6a
push str.ShutdownPending
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xb
call fcn.0040d4cf
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.00485ab0
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040daff
push 0
push 1
lea ecx, [ebp - 0x24]
call fcn.0040daff
lea ecx, [ebp + 0x1c]
call fcn.004370d5
push 0
push 1
lea ecx, [ebp + 0x44]
mov dword [ebp + 0x18], 0x6b6d84
mov byte [ebp - 4], 3
call fcn.0040daff
mov edi, dword [ebp + 0x3c]
push 0x32
pop eax
push eax
call dword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x57ba15
xor eax, eax
push eax
push eax
push eax
push 0xa
call fcn.005068ae
test eax, eax
je 0x57bcbf
add eax, 0xc
jmp 0x57bcc1
xor eax, eax
push 0
push eax
call fcn.00508389
test bl, bl
jne 0x57bcdd
push 0
call fcn.00580a29
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.004919a7
call fcn.004918a9
mov esi, eax
call fcn.0049185d
mov edi, eax
call fcn.004917a7
cmp dword [eax + 0x14], 0x10
jb 0x57bd09
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.004638c2
add esp, 0x20
lea ecx, [ebp - 0x54]
push eax
call fcn.0040d122
push 0
push 1
lea ecx, [ebp - 0x24]
call fcn.0040daff
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.0040d4cf
push 1
push esi
push 0x578e81
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x54]
push eax
push 0x1e
call fcn.00485ab0
push 0
push 1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.0040daff
push 0x1388
push esi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
sete cl
test cl, cl
mov ecx, str.SENT
jne 0x57bda0
mov ecx, 0x7044f0
push eax
push ecx
push str.ShutdownDone__s_with_wait_result__d.
call fcn.0040c884
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
call fcn.004a3ee5
mov esi, dword [eax + 4]
mov edi, esi
jmp 0x57bdca
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, dword [esi]
cmp esi, edi
jne 0x57bdc2
pop edi
pop esi
test bl, bl
jne 0x57bde5
xor ebx, ebx
mov ecx, 0x7a460c
push ebx
call fcn.0050d5cb
jmp 0x57bde7
xor ebx, ebx
mov byte [ebp + 0x67], 1
call fcn.00475cf1
mov ecx, dword [0x7a7060]
push ebx
mov byte [ebp - 4], 0xe
call fcn.0047627a
mov ecx, dword [0x7a7064]
test ecx, ecx
je 0x57be10
push ebx
call fcn.0047627a
mov ecx, dword [0x7a7068]
push ebx
call fcn.0047627a
mov ecx, dword [0x7a706c]
test ecx, ecx
je 0x57be2c
push ebx
call fcn.0047627a
mov byte [ebp - 4], 0xf
call fcn.00475d32
mov byte [ebp - 4], 3
call fcn.00485763
cmp byte [ebp + 0x68], 0
je 0x57be67
push dword [0x7b082c]
call dword [sym.imp.KERNEL32.DLL_ReleaseMutex]
push dword [0x7b082c]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
call fcn.00598851
push ebx
push 0x107
call fcn.0048a60f
cmp byte [ebp + 0x6c], 0
push ebx
je 0x57be7f
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push 1
lea ecx, [ebp - 0x54]
call fcn.0040daff
lea ecx, [ebp + 4]
call fcn.004370d5
mov ecx, dword [ebp - 0xc]
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x5c]
pop ebp
ret 0xc