Function at 0x57f4d3
Capabilities:
Hide graphical window
Terminate process

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x6ae1aa
call fcn.00640244
sub esp, 0x48
cmp dword [0x7e2568], 0
push ebx
mov ebx, ecx
mov dword [ebp + 0x40], ebx
je 0x57f502
mov ecx, dword [0x7e256c]
test ecx, ecx
je 0x57f502
call fcn.005b5435
cmp dword [ebp + 0x64], 0
mov eax, dword [ebp + 0x64]
jne 0x57f510
mov eax, 0x74471c
push eax
push str.DoDestroy__s
call fcn.0040e2b4
add esp, 8
call fcn.0059e251
call fcn.004889bd
call fcn.0047e35a
test al, al
jne 0x57fcbb
push esi
push edi
lea ecx, [ebx + 0xa4]
mov byte [0x7ad36d], al
call fcn.005d9ab3
lea ecx, [ebx + 0xb4]
call fcn.005d9ab3
lea ecx, [ebx + 0xc4]
call fcn.005d9ab3
lea ecx, [ebx + 0xd4]
call fcn.005d9ab3
lea ecx, [ebx + 0xe4]
call fcn.005d9ab3
lea ecx, [ebx + 0xf4]
call fcn.005d9ab3
call fcn.004a7313
mov esi, dword [eax + 4]
mov edi, esi
jmp 0x57f592
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
call dword [eax + 8]
mov esi, dword [esi]
cmp esi, edi
jne 0x57f58a
xor eax, eax
mov dword [ebp], 0x6c1070
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.0040eeff
push 0x6ce890
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 1
call fcn.0040eeff
lea eax, [ebp + 0x10]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp + 0x44]
push eax
lea ecx, [ebp]
call fcn.00439e1d
xor edi, edi
lea ecx, [ebp + 0x44]
push 0
inc edi
push edi
call fcn.0040f52f
push 0
push edi
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0
call fcn.0040f52f
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp]
call fcn.004404c8
push str.ShutdownBegin
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 3
call fcn.0040eeff
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.00488d2d
push 0
push edi
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 3
call fcn.0040f52f
push dword [0x7bdc9c]
call dword [sym.imp.USER32.dll_IsIconic]
push dword [0x7bdc9c]
test eax, eax
setne byte [ebp + 0x28]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
setne byte [ebp + 0x2c]
call fcn.0047e37e
cmp byte [0x7acdb1], 0
je 0x57f6ed
push str.Helper_shutdown
lea ecx, [ebp + 0x44]
call fcn.0040eeff
push 0x1f4
mov ecx, 0x7b1748
mov byte [ebp - 4], 5
call fcn.00503cc5
mov esi, str.succeeded
test al, al
jne 0x57f69e
mov esi, str.failed
push esi
call fcn.0040f10e
pop ecx
push eax
push esi
lea ecx, [ebp + 0x44]
call fcn.0040f072
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
jae 0x57f6bb
lea eax, [ebp + 0x44]
push eax
push 0x6d22d0
call fcn.0040dfc1
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
pop ecx
pop ecx
jae 0x57f6d4
lea eax, [ebp + 0x44]
push eax
push 0x10
call fcn.0048912b
pop ecx
pop ecx
push 0
push edi
lea ecx, [ebp + 0x44]
mov byte [ebp - 4], 3
call fcn.0040f52f
call fcn.005ad8b0
mov eax, dword [0x7e256c]
push edi
push dword [eax + 4]
call fcn.00583851
cmp byte [0x7ace95], 0
mov ecx, ebx
je 0x57f71b
push 4
call fcn.0057ec03
mov byte [0x7ace95], 0
jmp 0x57f725
push 0x200
call fcn.0057ec03
mov ecx, ebx
call fcn.0057f30c
call fcn.005e96e0
lea ecx, [ebx + 0x74]
call fcn.0059494d
mov ecx, ebx
call fcn.0058361f
push edi
call fcn.004c1d75
mov byte [ebp + 0x67], 1
call fcn.00478821
mov ecx, dword [0x7b0e18]
mov byte [ebp - 4], 6
mov eax, dword [ecx]
call dword [eax + 0x64]
mov eax, dword [0x7b43e0]
or byte [eax + 0x28], 1
mov eax, dword [0x7b43e4]
test eax, eax
je 0x57f774
or byte [eax + 0x28], 1
mov eax, dword [0x7b43e8]
or byte [eax + 0x1c], 1
mov eax, dword [0x7b43ec]
test eax, eax
je 0x57f78a
or byte [eax + 0x1c], 1
mov ecx, dword [0x7b2198]
test ecx, ecx
je 0x57f79b
push 1
call fcn.00478daa
mov ecx, dword [0x7b219c]
test ecx, ecx
je 0x57f7ac
push 1
call fcn.00478daa
mov byte [ebp - 4], 7
call fcn.00478862
push 0
push dword [ebx + 4]
mov byte [ebp - 4], 3
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [0x7bdb7c]
test esi, esi
je 0x57f7e9
mov ecx, esi
call fcn.005d9f13
push 0x9c
push esi
call fcn.00640264
and dword [0x7bdb7c], 0
pop ecx
pop ecx
mov ecx, dword [ebx + 0x6c]
test ecx, ecx
je 0x57f7ff
and dword [ebx + 0x6c], 0
test ecx, ecx
je 0x57f7ff
mov eax, dword [ecx]
push 1
call dword [eax + 0x14]
xor esi, esi
mov edi, 0x7bdee8
cmp dword [0x7bdef8], esi
jbe 0x57f82c
push esi
mov ecx, edi
call fcn.00424036
mov ecx, dword [eax]
test ecx, ecx
je 0x57f823
push 1
call fcn.004cc63e
inc esi
cmp esi, dword [0x7bdef8]
jb 0x57f80e
mov ecx, edi
call fcn.00470ce1
call fcn.00695c3d
mov esi, dword [ebp + 0x40]
xor edi, edi
xor bl, bl
call fcn.0048db0b
mov ecx, dword [0x789b28]
inc edi
mov dword [ebp + 0x40], eax
mov dword [ebp + 0x64], eax
mov dword [ebp + 0x3c], edi
test ecx, ecx
je 0x57f876
imul eax, ecx, 0x3e8
push 0x32
pop ecx
cdq
idiv ecx
cmp edi, eax
jl 0x57f873
mov eax, dword [ebp + 0x40]
and eax, 0xfffffff7
mov dword [ebp + 0x64], eax
jmp 0x57f876
mov eax, dword [ebp + 0x64]
cmp byte [0x7acdb1], 0
je 0x57f895
mov ecx, 0x7b1748
call fcn.00501cbe
test eax, eax
mov eax, dword [ebp + 0x64]
je 0x57f895
or eax, 0x10
jmp 0x57f898
and eax, 0xffffffef
cmp byte [0x789b21], 0
mov dword [ebp + 0x64], eax
je 0x57f8c2
cmp edi, 0xc8
jl 0x57f8b1
cmp eax, 1
je 0x57f8ca
cmp edi, 0x12c
jl 0x57f8ce
test eax, 0xffffffee
jne 0x57f8ce
jmp 0x57f8ca
cmp edi, 0xc8
jl 0x57f8ce
and dword [ebp + 0x64], 0
test byte [ebp + 0x40], 2
jne 0x57f8f1
test bl, bl
jne 0x57f8f1
push 1
call fcn.005847e5
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 0x57fad4
mov eax, edi
mov ecx, 0x4b0
cdq
idiv ecx
test edx, edx
jne 0x57fac5
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.0040f10e
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f072
test byte [ebp + 0x64], 1
mov edi, 0x70ede0
jne 0x57f944
mov edi, 0x74471c
push edi
call fcn.0040f10e
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f072
test byte [ebp + 0x64], 2
mov edi, str.DiskIO
jne 0x57f965
mov edi, 0x74471c
push edi
call fcn.0040f10e
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f072
test byte [ebp + 0x64], 4
mov edi, str.DelTorrents
jne 0x57f986
mov edi, 0x74471c
push edi
call fcn.0040f10e
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f072
test byte [ebp + 0x64], 8
mov edi, str.UPnP
jne 0x57f9a7
mov edi, 0x74471c
push edi
call fcn.0040f10e
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f072
test byte [ebp + 0x64], 0x10
mov edi, str.Helper
jne 0x57f9c8
mov edi, 0x74471c
push edi
call fcn.0040f10e
pop ecx
push eax
push edi
lea ecx, [ebp + 0x44]
call fcn.0040f072
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
jae 0x57f9e5
lea eax, [ebp + 0x44]
push eax
call fcn.0040dfc1
mov dword [esp], 0x744df4
call fcn.0040dfc1
cmp dword [ebp + 0x58], 0x10
mov eax, dword [ebp + 0x44]
pop ecx
jae 0x57fa04
lea eax, [ebp + 0x44]
push eax
push 0x10
call fcn.0048912b
xor eax, eax
mov dword [ebp + 0x18], 0x6c1070
pop ecx
pop ecx
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x20], eax
mov dword [ebp + 0x24], eax
push 0x6ce890
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 9
call fcn.0040eeff
lea eax, [ebp + 0x44]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp + 0x18]
call fcn.00439e1d
push 0
push 1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 9
call fcn.0040f52f
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp + 0x18]
call fcn.004404c8
push str.ShutdownPending
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xb
call fcn.0040eeff
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.00488d2d
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040f52f
push 0
push 1
lea ecx, [ebp - 0x24]
call fcn.0040f52f
lea ecx, [ebp + 0x1c]
call fcn.00438b16
push 0
push 1
lea ecx, [ebp + 0x44]
mov dword [ebp + 0x18], 0x6c1038
mov byte [ebp - 4], 3
call fcn.0040f52f
mov edi, dword [ebp + 0x3c]
push 0x32
pop eax
push eax
call dword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x57f83f
xor eax, eax
push eax
push eax
push eax
push 0xa
call fcn.00509baa
test eax, eax
je 0x57fae9
add eax, 0xc
jmp 0x57faeb
xor eax, eax
push 0
push eax
call fcn.0050b685
test bl, bl
jne 0x57fb07
push 0
call fcn.005847e5
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.004948c7
call fcn.004947c9
mov esi, eax
call fcn.0049477d
mov edi, eax
call fcn.004946c7
cmp dword [eax + 0x14], 0x10
jb 0x57fb33
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.004654bc
add esp, 0x20
lea ecx, [ebp - 0x54]
push eax
call fcn.0040eb52
push 0
push 1
lea ecx, [ebp - 0x24]
call fcn.0040f52f
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.0040eeff
push 1
push esi
push 0x57cd26
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x54]
push eax
push 0x1e
call fcn.00488d2d
push 0
push 1
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.0040f52f
push 0x1388
push esi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
sete cl
test cl, cl
mov ecx, str.SENT
jne 0x57fbca
mov ecx, 0x70ee60
push eax
push ecx
push str.ShutdownDone__s_with_wait_result__d.
call fcn.0040e2b4
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
call fcn.004a7313
mov esi, dword [eax + 4]
mov edi, esi
jmp 0x57fbf4
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, dword [esi]
cmp esi, edi
jne 0x57fbec
pop edi
pop esi
test bl, bl
jne 0x57fc0f
xor ebx, ebx
mov ecx, 0x7b1984
push ebx
call fcn.0051051c
jmp 0x57fc11
xor ebx, ebx
mov byte [ebp + 0x67], 1
call fcn.00478821
mov ecx, dword [0x7b43e0]
push ebx
mov byte [ebp - 4], 0xe
call fcn.00478daa
mov ecx, dword [0x7b43e4]
test ecx, ecx
je 0x57fc3a
push ebx
call fcn.00478daa
mov ecx, dword [0x7b43e8]
push ebx
call fcn.00478daa
mov ecx, dword [0x7b43ec]
test ecx, ecx
je 0x57fc56
push ebx
call fcn.00478daa
mov byte [ebp - 4], 0xf
call fcn.00478862
mov byte [ebp - 4], 3
call fcn.004889e0
cmp byte [ebp + 0x68], 0
je 0x57fc91
push dword [0x7bdcac]
call dword [sym.imp.KERNEL32.DLL_ReleaseMutex]
push dword [0x7bdcac]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
call fcn.0059cfd6
push ebx
push 0x107
call fcn.0048d69c
cmp byte [ebp + 0x6c], 0
push ebx
je 0x57fca9
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push 1
lea ecx, [ebp - 0x54]
call fcn.0040f52f
lea ecx, [ebp + 4]
call fcn.00438b16
mov ecx, dword [ebp - 0xc]
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x5c]
pop ebp
ret 0xc