Function at 0x401958
Capabilities:
Create thread
Resolve dns
Resolve function by parsing pe exports
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x41a9dd
mov eax, dword fs:[0]
push eax
sub esp, 0x744
mov eax, dword [0x426010]
xor eax, esp
mov dword [esp + 0x740], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x426010]
xor eax, esp
push eax
lea eax, [esp + 0x758]
mov dword fs:[0], eax
push 7
xor esi, esi
xor eax, eax
pop ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0xc0], ebx
mov dword [esp + 0xbc], esi
mov word [esp + 0xac], ax
push esi
mov dword [esp + 0x764], esi
push esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
call fcn.00403f0f
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], esi
push 2
pop ecx
mov byte [esp + 0x760], cl
lea ecx, [esp + 0x34]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push 0x10
push esi
lea eax, [esp + 0x28]
mov dword [esp + 0x54], 0x3f800000
push eax
mov dword [esp + 0x48], esi
call fcn.00403cf2
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], 8
push esi
lea eax, [esp + 0x2c]
mov byte [esp + 0x764], 3
mov ebx, dword [sym.imp.IPHLPAPI.DLL_GetIpAddrTable]
push eax
push esi
mov dword [esp + 0x24], esi
call ebx
cmp eax, 0x7a
jne 0x402039
push dword [esp + 0x28]
call fcn.0040888c
pop ecx
mov edi, eax
lea eax, [esp + 0x28]
push esi
push eax
push edi
call ebx
mov dword [esp + 0x14], eax
test eax, eax
jne 0x401aa5
mov ebx, esi
cmp dword [edi], esi
jbe 0x401aa5
lea ebp, [edi + 4]
push dword [ebp]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x50]
call fcn.00402c41
lea eax, [esp + 0x4c]
mov byte [esp + 0x760], 4
push eax
lea ecx, [esp + 0x30]
call fcn.00402f61
xor ecx, ecx
mov byte [esp + 0x760], 3
inc ecx
push esi
mov dword [eax], ecx
push ecx
lea ecx, [esp + 0x54]
call fcn.0040323e
inc ebx
lea ebp, [ebp + 0x18]
cmp ebx, dword [edi]
jb 0x401a5c
push edi
call fcn.00408814
cmp dword [esp + 0x18], 0
pop ecx
jne 0x402039
mov edi, dword [sym.imp.WS2_32.dll_gethostbyname]
push 0x4216f8
call edi
push dword [eax]
call edi
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 + 0x80]
call fcn.00402c41
push ecx
push ecx
lea ecx, [esp + 0x84]
mov byte [esp + 0x768], 5
call fcn.00402c78
push eax
push ecx
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x88]
call fcn.00402cf2
mov edi, eax
lea eax, [esp + 0x7c]
cmp eax, edi
je 0x401b2c
push esi
push 1
mov ecx, eax
call fcn.0040323e
push edi
lea ecx, [esp + 0x80]
call fcn.00403023
push esi
push 1
lea ecx, [esp + 0x54]
call fcn.0040323e
push 0x42185c
call fcn.00401193
pop ecx
push eax
push ecx
lea ecx, [esp + 0x84]
call fcn.0040310e
mov edi, esi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esp + edi*4 + 0x214], eax
inc edi
cmp edi, 0x100
jl 0x401b53
lea ebp, [esp + 0x214]
mov eax, esi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], ebp
mov ebx, 0x4288a4
mov dword [esp + 0x1c], eax
mov ebp, eax
lea edi, [ebx - 4]
push 0x421754
lea ecx, [ebx + 0x18]
mov dword [edi], esi
call fcn.004032c9
cmp dword [esp + 0x90], 0x10
lea eax, [esp + 0x7c]
push ebp
cmovae eax, dword [esp + 0x80]
push eax
lea eax, [esp + 0x61c]
push eax
call fcn.004080ad
lea eax, [esp + 0x620]
push eax
call fcn.00401193
add esp, 0x10
mov ecx, ebx
push eax
lea eax, [esp + 0x618]
push eax
call fcn.004034e7
lea eax, [esp + 0x614]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
mov dword [ebx + 0x34], eax
pop eax
push 0x50
mov word [ebx + 0x30], ax
call dword [sym.imp.WS2_32.dll_htons]
push esi
push esi
push edi
mov word [ebx + 0x32], ax
mov eax, dword [esp + 0x2c]
push 0x401860
push esi
push esi
mov eax, dword [eax]
mov dword [ebx + 0x44], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
add dword [esp + 0x20], 4
add ebx, 0x4c
inc ebp
cmp ebx, 0x429ba4
jl 0x401b89
push 0x9c4
push 1
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x1c]
push ebp
push 0x40
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor eax, eax
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], esi
mov word [esp + 0x64], ax
mov dword [esp + 0xa8], 7
mov dword [esp + 0xa4], esi
mov word [esp + 0x94], ax
mov byte [esp + 0x760], 7
mov edi, 0x4288a4
cmp dword [edi + 0x14], 0x10
jb 0x401c8c
mov eax, dword [edi]
jmp 0x401c8e
mov eax, edi
lea ecx, [esp + 0x110]
push 3
mov dword [esp + 0x110], ecx
lea ecx, [esp + 0x110]
push eax
call fcn.00403440
lea eax, [esp + 0x110]
cmp dword [esp + 0x10c], eax
je 0x401cc8
push dword [esp + 0x10c]
call fcn.00408814
pop ecx
cmp dword [edi - 4], esi
je 0x401f07
cmp dword [edi + 0x14], 0x10
jb 0x401cdb
mov eax, dword [edi]
jmp 0x401cdd
mov eax, edi
lea ecx, [esp + 0x110]
push 3
mov dword [esp + 0x110], ecx
lea ecx, [esp + 0x110]
push eax
call fcn.00403440
mov byte [esp + 0x760], 8
lea ecx, [esp + 0x94]
push dword [esp + 0x10c]
call fcn.004032c9
lea eax, [esp + 0x110]
mov byte [esp + 0x760], 7
cmp dword [esp + 0x10c], eax
je 0x401d3a
push dword [esp + 0x10c]
call fcn.00408814
pop ecx
lea eax, [edi + 0x18]
lea ecx, [esp + 0x64]
cmp ecx, eax
je 0x401d4e
push 0xffffffffffffffff
push esi
push eax
call fcn.004037c5
mov eax, dword [esp + 0x74]
test eax, eax
jne 0x401d6e
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x9c]
push eax
lea ecx, [esp + 0x70]
call fcn.004037c5
mov eax, dword [esp + 0x74]
cmp eax, 0x13
jbe 0x401d9a
push 0x13
push esi
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x70]
call fcn.00402de5
push eax
lea ecx, [esp + 0x68]
call fcn.00402d42
push esi
push 1
lea ecx, [esp + 0x54]
call fcn.00403338
cmp dword [edi + 0x14], 0x10
jb 0x401da4
mov eax, dword [edi]
jmp 0x401da6
mov eax, edi
push eax
lea ecx, [esp + 0x50]
call fcn.00402c41
lea eax, [esp + 0x4c]
mov byte [esp + 0x760], 9
push eax
lea ecx, [esp + 0x30]
call fcn.00402f61
push esi
push 1
lea ecx, [esp + 0x54]
cmp dword [eax], 1
mov byte [esp + 0x768], 7
setne bl
call fcn.0040323e
test bl, bl
je 0x401f07
cmp dword [esp + 0xa8], 8
lea eax, [esp + 0x94]
cmovae eax, dword [esp + 0x94]
sub esp, 0x18
mov ecx, esp
push eax
call fcn.00402d20
call fcn.004014f4
add esp, 0x18
test eax, eax
je 0x401f07
lea eax, [esp + 0x64]
mov edx, str.name_
push eax
lea ecx, [esp + 0xc8]
call fcn.00403f41
mov byte [esp + 0x764], 0xa
lea ecx, [esp + 0x50]
mov edx, eax
mov dword [esp], 0x421860
call fcn.00403ff2
pop ecx
push esi
push 1
lea ecx, [esp + 0xcc]
mov byte [esp + 0x768], 0xc
call fcn.00403338
lea eax, [esp + 0x94]
mov edx, 0x421844
push eax
lea ecx, [esp + 0xe0]
call fcn.00403f41
mov byte [esp + 0x764], 0xd
lea ecx, [esp + 0xf8]
mov edx, eax
mov dword [esp], 0x421868
call fcn.00403ff2
pop ecx
push 0xffffffffffffffff
push esi
push eax
lea ecx, [esp + 0x58]
mov byte [esp + 0x76c], 0xe
call fcn.004036a4
push esi
push 1
lea ecx, [esp + 0xfc]
call fcn.00403338
push esi
push 1
lea ecx, [esp + 0xe4]
mov byte [esp + 0x768], 0xc
call fcn.00403338
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0xb8]
call fcn.004036a4
mov ebx, dword [esp + 0x18]
lea ecx, [esp + 0x4c]
push esi
inc ebx
mov byte [esp + 0x764], 7
push 1
mov dword [esp + 0x20], ebx
call fcn.00403338
jmp 0x401f0b
mov ebx, dword [esp + 0x18]
add edi, 0x4c
cmp edi, 0x429ba4
jl 0x401c82
push esi
push 1
lea ecx, [esp + 0x9c]
call fcn.00403338
push esi
push 1
lea ecx, [esp + 0x6c]
mov byte [esp + 0x768], 5
call fcn.00403338
mov eax, dword [esp + 0x20]
mov ebp, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
cmp eax, 0x100
jl 0x401b7a
mov edi, esi
push dword [esp + edi*4 + 0x214]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, 0x100
jl 0x401f58
lea eax, [esp + 0x24]
push eax
push 3
push esi
push str.SoftwareJPLAY
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401fc2
cmp dword [esp + 0xc0], 8
lea ecx, [esp + 0xac]
mov eax, dword [esp + 0xbc]
cmovae ecx, dword [esp + 0xac]
add eax, eax
push eax
push ecx
push 1
push esi
push str.AudioPC
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x401fce
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40202a
test ebx, ebx
jne 0x401fe9
lea eax, [esp + 0x654]
push str.Could_not_find_JPLAY_on_LAN_n_nCheck_if_JPLAY_is_running_and_if_Firewall_is_not_blocking_port_48168
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
pop ecx
pop ecx
jmp 0x402011
mov ecx, 0x421934
cmp ebx, 1
mov eax, 0x421754
cmovne eax, ecx
push eax
push ebx
lea eax, [esp + 0x65c]
push str.JPLAY_found_on__d_address_s_nRestart_JPLAYSettings_and_you_should_be_able_to_select_your_AudioPC_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0x50040
push str.JPLAY_Settings
lea eax, [esp + 0x65c]
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
push esi
push 1
lea ecx, [esp + 0x84]
call fcn.0040323e
cmp dword [esp + 0x34], 0
je 0x402056
push dword [esp + 0x34]
call fcn.00408099
pop ecx
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
lea ecx, [esp + 0x2c]
call fcn.004033e5
push esi
push 1
lea ecx, [esp + 0xb4]
call fcn.00403338
mov ecx, dword [esp + 0x758]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x740]
xor ecx, esp
call fcn.0040809e
add esp, 0x750
ret