Function at 0x405c50
Capabilities:
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x4da6a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push ebp
push edi
mov edi, ecx
mov eax, dword [0x52506c]
xor ebp, ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], eax
push ebp
push ebp
push ebp
push ebp
lea ecx, [esp + 0x2c]
mov byte [esp + 0x3c], 1
call fcn.0048202d
mov eax, dword [0x5335e0]
mov ebx, dword [esp + 0x38]
cmp eax, ebp
mov byte [esp + 0x2c], 2
je 0x405cce
push 0x198
push str.C:NeoAudio_1.5.7cddb.cpp
push str.___11s__4d:
call fcn.004244f0
mov ecx, dword [esp + 0x40]
add esp, 0xc
push ebx
push ecx
push str.CDdb::OpenConnection___s___d__
call fcn.004244f0
add esp, 0xc
cmp dword [edi + 0x10], ebp
je 0x405d4b
lea edx, [esp + 0x38]
push 0xc49
push edx
mov ecx, 0x5bd568
mov dword [edi + 0x10], ebp
call fcn.00442120
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x30], 3
call fcn.004b278f
lea ecx, [esp + 0x38]
mov byte [esp + 0x2c], 2
call fcn.004b2656
cmp dword [0x5335dc], ebp
je 0x405d4b
push 0xffffffffffffffff
mov ecx, 0x5335c8
call fcn.00482829
lea eax, [esp + 0x10]
mov ecx, 0x5335d8
push eax
call fcn.004b278f
mov ecx, 0x5335c8
call fcn.00482023
mov ecx, dword [0x5335dc]
push ebp
push ebp
push 0x753
mov edx, dword [ecx + 0x1c]
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
push ebp
call fcn.004d8aa9
test eax, eax
jne 0x405d62
push 0xffffffffffffffff
push ebp
push 0xbc2
call fcn.004c1016
push esi
push ebp
call sub.WSOCK32.dll_WSASetLastError
lea eax, [esp + 0x10]
mov ecx, 0x534938
push eax
call fcn.00406030
mov ecx, dword [0x53494c]
mov byte [esp + 0x30], 4
mov eax, ecx
and eax, 0xffff
lea edx, [eax*8]
sub edx, eax
mov eax, dword [0x534940]
mov esi, dword [eax + edx*4 + 0x10]
mov edx, dword [esp + 0x38]
cmp dword [edx - 8], ebp
je 0x405dbb
lea eax, [esp + 0x38]
lea ecx, [esp + 0x10]
push eax
call fcn.004b278f
mov ecx, dword [0x53494c]
mov esi, ebx
mov eax, dword [0x534940]
and ecx, 0xffff
mov ebx, 1
lea edx, [ecx*8]
sub edx, ecx
cmp dword [eax + edx*4 + 0x14], ebx
jne 0x405e1a
mov eax, dword [0x53498c]
mov esi, 0x50
cmp eax, ebp
je 0x405e1a
mov esi, dword [0x534984]
lea ecx, [esp + 0x3c]
push ecx
mov ecx, 0x534950
call fcn.00406070
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 5
call fcn.004b278f
lea ecx, [esp + 0x3c]
mov byte [esp + 0x30], 4
call fcn.004b2656
push 0
lea ebp, [edi + 0x8028]
push 0x3f
push ebx
push 0
mov ecx, ebp
call fcn.004d8bd7
test eax, eax
mov eax, dword [0x5335e0]
jne 0x405e68
test eax, eax
je 0x405fad
push 0x1cc
push str.C:NeoAudio_1.5.7cddb.cpp
push str.___11s__4d:
call fcn.004244f0
add esp, 0xc
push str.Failed_to_create_socket
call fcn.004244f0
add esp, 4
jmp 0x405fad
test eax, eax
je 0x405e96
push 0x1d3
push str.C:NeoAudio_1.5.7cddb.cpp
push str.___11s__4d:
call fcn.004244f0
mov edx, dword [esp + 0x1c]
add esp, 0xc
push esi
push edx
push str.Open_connection__s_Port_d
call fcn.004244f0
add esp, 0xc
mov eax, dword [esp + 0x10]
push esi
push eax
mov ecx, ebp
call fcn.004d8e44
test eax, eax
jne 0x405f66
mov ecx, dword [0x52506c]
mov dword [esp + 0x3c], ecx
lea edx, [esp + 0x18]
mov bl, 6
push 0xc2e
push edx
mov ecx, 0x5bd568
mov byte [esp + 0x38], bl
call fcn.00442120
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x34], 7
call fcn.004b278f
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], bl
call fcn.004b2656
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x44]
push str._s__d_r_n
push ecx
call fcn.004acb0b
mov eax, dword [0x5335dc]
add esp, 0x10
test eax, eax
je 0x405f4e
push 0xffffffffffffffff
mov ecx, 0x5335c0
call fcn.00482829
lea edx, [esp + 0x3c]
mov ecx, 0x5335d0
push edx
call fcn.004b2a6e
mov ecx, 0x5335c0
call fcn.00482023
mov eax, dword [0x5335dc]
push 0
push 0
push 0x752
mov ecx, dword [eax + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x18], 1
mov byte [esp + 0x30], 4
call fcn.004b2656
jmp 0x405fa9
mov eax, dword [edi + 0x802c]
lea edx, [esp + 0x3c]
push 4
push edx
push 8
push 0xffff
push eax
mov dword [esp + 0x50], ebx
call sub.WSOCK32.dll_setsockopt
mov edx, dword [edi + 0x802c]
lea ecx, [esp + 0x1c]
push 4
push ecx
push 0x1002
push 0xffff
push edx
mov dword [esp + 0x30], 0x8000
call sub.WSOCK32.dll_setsockopt
mov ebx, dword [esp + 0x18]
mov eax, dword [0x5335e0]
pop esi
test eax, eax
je 0x405fdc
push 0x1ff
push str.C:NeoAudio_1.5.7cddb.cpp
push str.___11s__4d:
call fcn.004244f0
add esp, 0xc
push ebx
push str.Leaving_CDdb::OpenConnection____return_value__d
call fcn.004244f0
add esp, 8
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 2
call fcn.004b2656
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2c], 1
call fcn.0048209b
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 0
call fcn.004b2656
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], 0xffffffff
call fcn.004b2656
mov ecx, dword [esp + 0x24]
pop edi
mov eax, ebx
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret 8