Function at 0x417403
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x40
mov eax, dword [ebp + 0xc]
mov byte [ebp - 0x1c], al
mov dword [esp + 0xc], 0x258
mov dword [esp + 8], 1
mov dword [esp + 4], str.recv_timeout
mov dword [esp], 0x4edaf3
call dbg.getDefine_Int
mov dword [0x57ff88], eax
mov eax, dword [0x5701f4]
mov eax, dword [eax + 8]
test eax, eax
js 0x417538
mov eax, dword [0x5701f4]
mov eax, dword [eax + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, dword [0x5701f4]
mov dword [eax + 8], 0xffffffff
mov eax, dword [0x5701f4]
mov edx, dword [eax]
mov eax, dword [0x5701f4]
mov eax, dword [eax + 0x14]
mov ecx, eax
mov eax, ecx
add eax, eax
add eax, ecx
shl eax, 3
add eax, edx
mov eax, dword [eax]
test eax, eax
je 0x417538
cmp byte [ebp - 0x1c], 0
je 0x417538
mov eax, dword [0x5701f4]
mov edx, dword [eax]
mov eax, dword [0x5701f4]
mov eax, dword [eax + 0x14]
mov ecx, eax
mov eax, ecx
add eax, eax
add eax, ecx
shl eax, 3
add eax, edx
mov eax, dword [eax + 8]
cmp eax, 0x11
jne 0x4174c6
mov esi, 0x4edaf9
jmp 0x4174cb
mov esi, 0x4edafd
mov eax, dword [0x5701f4]
mov edx, dword [eax]
mov eax, dword [0x5701f4]
mov eax, dword [eax + 0x14]
mov ecx, eax
mov eax, ecx
add eax, eax
add eax, ecx
shl eax, 3
add eax, edx
mov edx, dword [eax + 4]
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov eax, dword [0x5701f4]
mov eax, dword [eax + 0x14]
mov ebx, eax
mov eax, ebx
add eax, eax
add eax, ebx
shl eax, 3
add eax, ecx
mov eax, dword [eax]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Closing_connection_to_server____s_:_d__s_.
mov dword [esp + 8], global___func__.18
mov dword [esp + 4], 0x3d
mov dword [esp], str.client_agent_start_agent.c
call dbg._minfo
mov dword [ebp - 0xc], 0
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov eax, dword [eax]
mov dword [esp + 4], 0x2f
mov dword [esp], eax
call sym._strchr
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x417581
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._strdup
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4175b1
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov eax, dword [eax]
mov dword [esp + 4], 3
mov dword [esp], eax
call dbg.OS_GetHost
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4175c5
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax]
test al, al
jne 0x4176c2
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov eax, dword [eax]
test eax, eax
je 0x41767c
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov eax, dword [eax]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x14], eax
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov ecx, dword [eax]
mov eax, dword [0x5701f4]
mov ebx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ebx
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
sub edx, 1
add eax, edx
movzx eax, byte [eax]
cmp al, 0x2f
jne 0x41764b
mov eax, dword [ebp - 0x14]
sub eax, 1
jmp 0x41764e
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4edb4c
mov dword [esp + 8], global___func__.18
mov dword [esp + 4], 0x54
mov dword [esp], str.client_agent_start_agent.c
call dbg._minfo
jmp 0x4176a0
mov dword [esp + 0xc], 0x4edb6e
mov dword [esp + 8], global___func__.18
mov dword [esp + 4], 0x56
mov dword [esp], str.client_agent_start_agent.c
call dbg._minfo
cmp dword [ebp - 0xc], 0
je 0x4176b8
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0xc], 0
mov eax, 0
jmp 0x4179a5
cmp byte [ebp - 0x1c], 0
je 0x417754
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov eax, dword [eax + 8]
cmp eax, 0x11
jne 0x4176f0
mov esi, 0x4edaf9
jmp 0x4176f5
mov esi, 0x4edafd
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov ecx, dword [eax + 4]
mov eax, dword [0x5701f4]
mov ebx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ebx
mov eax, dword [eax]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Trying_to_connect_to_server____s_:_d__s_.
mov dword [esp + 8], global___func__.18
mov dword [esp + 4], 0x5d
mov dword [esp], str.client_agent_start_agent.c
call dbg._minfo
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov eax, dword [eax + 8]
cmp eax, 0x11
jne 0x4177e1
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov esi, dword [eax + 0xc]
mov dword [esp + 4], 0x3a
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._strchr
test eax, eax
setne al
movzx ecx, al
mov eax, dword [0x5701f4]
mov ebx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ebx
mov eax, dword [eax + 4]
movzx eax, ax
mov ebx, dword [0x5701f4]
mov dword [esp + 0xc], esi
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.OS_ConnectUDP
mov dword [ebx + 8], eax
jmp 0x41784f
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov esi, dword [eax + 0xc]
mov dword [esp + 4], 0x3a
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._strchr
test eax, eax
setne al
movzx ecx, al
mov eax, dword [0x5701f4]
mov ebx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ebx
mov eax, dword [eax + 4]
movzx eax, ax
mov ebx, dword [0x5701f4]
mov dword [esp + 0xc], esi
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.OS_ConnectTCP
mov dword [ebx + 8], eax
mov eax, dword [0x5701f4]
mov eax, dword [eax + 8]
test eax, eax
jns 0x417903
mov eax, dword [0x5701f4]
mov dword [eax + 8], 0xffffffff
cmp byte [ebp - 0x1c], 0
je 0x417988
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov dword [esp], eax
call dbg.win_strerror
mov ecx, eax
mov eax, dword [0x5701f4]
mov ebx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ebx
mov eax, dword [eax + 8]
cmp eax, 0x11
jne 0x4178aa
mov esi, 0x4edaf9
jmp 0x4178af
mov esi, 0x4edafd
mov eax, dword [0x5701f4]
mov ebx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ebx
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str._1216_:_Unable_to_connect_to___s_:_d__s:__s.
mov dword [esp + 8], global___func__.18
mov dword [esp + 4], 0x6d
mov dword [esp], str.client_agent_start_agent.c
call dbg._merror
jmp 0x417988
mov eax, dword [0x5701f4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, edx
add eax, eax
add eax, edx
shl eax, 3
add eax, ecx
mov eax, dword [eax + 8]
cmp eax, 0x11
jne 0x41794d
mov dword [ebp - 0x18], 1
mov eax, dword [0x5701f4]
mov eax, dword [eax + 8]
mov edx, eax
lea eax, [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x8004667e
mov dword [esp], edx
mov eax, dword [sym.imp.WSOCK32.DLL_ioctlsocket]
call eax
sub esp, 0xc
mov eax, dword [0x5701f4]
mov edx, dword [ebp + 8]
mov dword [eax + 0x14], edx
mov dword [esp], 0
call sym._time_6
mov dword [0x5701a4], eax
cmp dword [ebp - 0xc], 0
je 0x417981
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0xc], 0
mov eax, 1
jmp 0x4179a5
cmp dword [ebp - 0xc], 0
je 0x4179a0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0xc], 0
mov eax, 0
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret