Function at 0x404bd8
Capabilities:
Check mutex on windows
Create thread
Resolve dns
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x419b3b
mov eax, dword fs:[0]
push eax
sub esp, 0x1dc
mov eax, dword [0x4250c0]
xor eax, esp
mov dword [esp + 0x1d8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4250c0]
xor eax, esp
push eax
lea eax, [esp + 0x1f0]
mov dword fs:[0], eax
mov esi, ecx
push str.JPLAYStreamer_Driver
xor ebp, ebp
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x404c4e
push str.BUSY:_Close_player_or_press_STOP_to_open_settings
mov ecx, 0x425ffc
call fcn.00403085
jmp 0x404f28
push ebp
push ebp
push esi
push 0x40467e
push ebp
push ebp
mov dword [0x427724], ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [0x429248]
mov esi, eax
test cl, 1
jne 0x404c84
or ecx, 1
mov dword [0x429248], ecx
call fcn.0040298b
mov dword [0x429238], eax
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x2710
push esi
call ebp
push esi
call ebx
cmp dword [0x427724], 0
je 0x404cb7
mov ecx, 0x4204d4
push ecx
push ecx
mov ecx, dword [0x429238]
call fcn.00401fca
mov al, 1
jmp 0x404f2a
push 2
push dword [0x425fb4]
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [0x425fb4]
call dword [sym.imp.WS2_32.dll_closesocket]
or dword [0x425fb4], 0xffffffff
mov edi, 0x425fcc
push edi
mov edx, str.Unable_to_connect_to_JPLAY_on
lea ecx, [esp + 0x30]
call fcn.00403e30
and dword [esp + 0x1fc], 0
mov edx, eax
lea ecx, [esp + 0x48]
mov dword [esp], str._nCheck_if_server_is_up_and_JPLAY_is_running
call fcn.00403ee1
pop ecx
mov esi, 0x425ffc
push eax
mov ecx, esi
call fcn.00402c5e
push 0
push 1
lea ecx, [esp + 0x4c]
call fcn.004030f4
or dword [esp + 0x1f8], 0xffffffff
push 0
push 1
lea ecx, [esp + 0x34]
call fcn.004030f4
cmp dword [0x426010], 8
mov ecx, dword [0x429238]
cmovae esi, dword [0x425ffc]
push str.Cant_connect
push esi
call fcn.00401fca
mov esi, dword [sym.imp.WS2_32.dll_gethostbyname]
push 0x420478
call esi
push dword [eax]
call esi
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x18]
call fcn.00402b48
mov dword [esp + 0x1f8], 1
cmp dword [0x425fe0], 8
push 3
cmovae edi, dword [0x425fcc]
lea eax, [esp + 0x64]
push edi
lea ecx, [esp + 0x64]
mov dword [esp + 0x64], eax
call fcn.00405734
mov byte [esp + 0x1f8], 2
cmp dword [esp + 0x28], 0x10
push dword [esp + 0x5c]
lea eax, [esp + 0x18]
cmovae eax, dword [esp + 0x18]
push eax
call fcn.00408e65
pop ecx
pop ecx
test eax, eax
je 0x404f0b
cmp dword [esp + 0x28], 0x10
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
lea ecx, [esp + 0xe8]
push 3
mov dword [esp + 0xe8], ecx
push eax
lea ecx, [esp + 0xec]
call fcn.004031f8
xor edi, edi
push edi
push edi
mov byte [esp + 0x200], 3
push dword [esp + 0xec]
push 0x40467e
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
push 0x1388
push esi
call ebp
push esi
call ebx
push 2
push dword [0x425fb4]
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [0x425fb4]
call dword [sym.imp.WS2_32.dll_closesocket]
or dword [0x425fb4], 0xffffffff
cmp dword [0x427724], edi
je 0x404eee
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [esp + 0xe4]
mov esi, 0x42602c
mov ecx, esi
call fcn.00403085
mov ecx, dword [0x429238]
push str.Reconnected_locally
push str.Using_JPLAY_on_local_PC
call fcn.00401fca
cmp dword [0x425ff8], 8
push 0x427720
push 3
mov eax, 0x425fe4
cmovae eax, dword [0x425fe4]
push edi
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x404eee
cmp dword [0x426040], 8
mov eax, dword [0x42603c]
cmovae esi, dword [0x42602c]
add eax, eax
push eax
push esi
push 1
push edi
push str.Host
push dword [0x427720]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [0x427720]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0xe8]
cmp dword [esp + 0xe4], eax
je 0x404f0b
push dword [esp + 0xe4]
call fcn.00408674
pop ecx
lea eax, [esp + 0x60]
cmp dword [esp + 0x5c], eax
je 0x404f1f
push dword [esp + 0x5c]
call fcn.00408674
pop ecx
lea ecx, [esp + 0x14]
call fcn.00402b75
xor al, al
mov ecx, dword [esp + 0x1f0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1d8]
xor ecx, esp
call fcn.00407f04
add esp, 0x1e8
ret