Function at 0x405230
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Query or enumerate registry value
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0xe8
mov eax, dword [0x415020]
xor eax, esp
mov dword [esp + 0xe4], eax
push ebx
push ebp
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
push esi
push edi
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, 2
push 0xbde
mov word [esp + 0x20], ax
call sub.WSOCK32.dll_htons
push 0x416a60
lea ecx, [esp + 0x30]
push str.CompleteGP_s
push ecx
mov word [esp + 0x2a], ax
mov word [0x416c00], ax
call ebp
add esp, 0xc
push 0x412c50
lea edx, [esp + 0x30]
push edx
call sub.WSOCK32.dll_getservbyname
cmp eax, ebx
je 0x4052b7
mov ax, word [eax + 8]
mov word [esp + 0x1e], ax
mov word [0x416c00], ax
mov eax, dword [str.127.00.1]
mov ecx, dword [0x412c48]
mov dl, byte [0x412c4c]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x14]
push eax
mov eax, dword [0x416a88]
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x3c], dl
lea edx, [esp + 0x18]
push edx
push ebx
push str.Server
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], 0xc8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x2c]
push 0x2c
push ecx
call fcn.00406200
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x405320
mov byte [edi], bl
inc edi
lea esp, [esp]
lea edx, [esp + 0x2c]
push 0x3b
push edx
call fcn.00406200
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x405354
lea eax, [esi + 1]
push eax
call fcn.00406718
add esp, 4
push eax
call sub.WSOCK32.dll_htons
mov word [0x416c00], ax
mov word [esp + 0x1e], ax
mov byte [esi], bl
lea ecx, [esp + 0x2c]
push ecx
call sub.WSOCK32.dll_inet_addr
mov dword [0x416c10], eax
cmp eax, 0xffffffff
jne 0x405389
lea edx, [esp + 0x2c]
push edx
call sub.WSOCK32.dll_gethostbyname
cmp eax, ebx
je 0x405384
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov eax, dword [ecx]
mov dword [0x416c10], eax
jmp 0x405389
mov eax, dword [0x416c10]
push ebx
push 1
push 2
mov dword [esp + 0x2c], eax
call sub.WSOCK32.dll_socket
push 0x10
lea edx, [esp + 0x20]
push edx
push eax
mov dword [0x416a40], eax
call sub.WSOCK32.dll_connect
mov eax, dword [0x416a48]
mov byte [eax], bl
mov edx, dword [0x416a48]
mov ecx, 0xc
mov word [edx + 1], cx
mov eax, dword [0x416a48]
mov dword [eax + 3], 0x20005
mov ecx, dword [0x416a48]
mov byte [ecx + 7], bl
mov edx, dword [0x416a48]
mov dword [edx + 8], ebx
mov eax, dword [0x416a48]
movzx ecx, word [eax + 1]
mov edx, dword [0x416a40]
push ebx
push ecx
push eax
push edx
call sub.WSOCK32.dll_send
xor esi, esi
jmp 0x405400
mov eax, dword [0x416c08]
mov ecx, dword [0x416a40]
push ebx
push 0x8000
add eax, esi
push eax
push ecx
call sub.WSOCK32.dll_recv
cmp eax, ebx
mov dword [esp + 0x10], eax
jle 0x405429
add esi, eax
cmp esi, 0xe
jb 0x405400
mov ecx, dword [0x416c08]
movzx edx, word [ecx]
cmp esi, edx
jge 0x40546b
jmp 0x405440
mov eax, dword [0x416a40]
push ebx
push 0x8000
add ecx, esi
push ecx
push eax
call sub.WSOCK32.dll_recv
cmp eax, ebx
mov dword [esp + 0x10], eax
jle 0x405478
mov ecx, dword [0x416c08]
movzx edx, word [ecx]
add esi, eax
cmp esi, edx
jl 0x405440
cmp eax, ebx
jle 0x405478
cmp dword [ecx + 2], ebx
jge 0x405508
mov eax, dword [0x416a40]
push eax
call sub.WSOCK32.dll_closesocket
cmp dword [esp + 0x10], ebx
jg 0x4057bc
cmp edi, ebx
je 0x4054f8
lea edx, [esp + 0x2c]
mov eax, edi
sub edx, edi
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x4054a0
lea ecx, [esp + 0x2c]
push 0x2c
push ecx
call fcn.00406200
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x4054c2
mov byte [edi], bl
inc edi
mov eax, dword [0x416a48]
lea edx, [esp + 0x2c]
push edx
push str.Do_you_want_to_use_the_Backup_server____s_
push eax
call ebp
mov ecx, dword [0x416a48]
add esp, 0xc
push 0x114
push str.CompleteGP
push ecx
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
je 0x405320
push 0x7530
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x405250
mov eax, dword [ecx + 6]
mov dword [0x416a8c], eax
cmp eax, ebx
jne 0x405520
mov edx, dword [0x416c10]
mov dword [0x416a8c], edx
mov ax, word [ecx + 0xa]
mov word [0x416a94], ax
mov dx, word [ecx + 0x16]
mov word [0x416c02], dx
mov eax, dword [ecx + 0xe]
mov dword [0x416a44], eax
mov ecx, dword [ecx + 0x18]
mov dword [0x415fd0], ecx
cmp ecx, ebx
je 0x405587
mov eax, dword [0x415fcc]
cmp eax, ebx
je 0x405562
push eax
call fcn.00405ccd
mov ecx, dword [0x415fd0]
add esp, 4
push ecx
call fcn.00405daa
mov ecx, dword [0x415fd0]
mov edx, dword [0x416c08]
push ecx
add edx, 0x1c
push edx
push eax
mov dword [0x415fcc], eax
call fcn.00405e80
add esp, 0x10
push ebx
mov edi, 1
push edi
push 2
call sub.WSOCK32.dll_socket
test byte [0x416a44], 1
mov dword [0x416c0c], eax
je 0x4055e0
mov cx, word [0x416c02]
push 0x10
lea edx, [esp + 0x20]
push edx
push eax
mov word [esp + 0x2a], cx
call sub.WSOCK32.dll_connect
mov eax, dword [0x416c08]
mov ecx, dword [eax + 0x12]
mov eax, dword [0x416c0c]
push ebx
push 4
lea edx, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x24], ecx
call sub.WSOCK32.dll_send
jmp 0x405681
push 0x416a60
lea edx, [esp + 0x30]
xor ecx, ecx
push str.CompleteGPReply_s
push edx
mov dword [esp + 0x2c], ebx
mov word [esp + 0x2a], cx
call ebp
add esp, 0xc
push 0x412c50
lea eax, [esp + 0x30]
push eax
call sub.WSOCK32.dll_getservbyname
cmp eax, ebx
je 0x405638
mov cx, word [eax + 8]
mov eax, dword [0x416c0c]
push 4
lea edx, [esp + 0x1c]
push edx
push 4
push 0xffff
push eax
mov dword [esp + 0x2c], edi
mov word [esp + 0x32], cx
call sub.WSOCK32.dll_setsockopt
mov edx, dword [0x416c0c]
push 0x10
lea ecx, [esp + 0x20]
push ecx
push edx
call sub.WSOCK32.dll_bind
mov edx, dword [0x416c0c]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ecx
push edx
mov dword [esp + 0x1c], 0x10
call sub.WSOCK32.dll_getsockname
mov ecx, dword [0x416c0c]
mov ax, word [esp + 0x1e]
push edi
push ecx
mov word [0x416c02], ax
call sub.WSOCK32.dll_listen
mov edx, dword [0x416a40]
push 0x412bdc
push str.Microsoft_SQL
push edx
call fcn.00404630
add esp, 0xc
test byte [0x416a44], 1
mov dword [esp + 0x10], 0x10
jne 0x4056d4
mov edx, dword [0x416c0c]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ecx
push edx
call sub.WSOCK32.dll_accept
mov esi, eax
mov eax, dword [0x416c0c]
push eax
call sub.WSOCK32.dll_closesocket
mov dword [0x416c0c], esi
mov ecx, dword [0x416a48]
mov byte [ecx], 0xf
mov edx, dword [0x416a48]
mov dword [edx + 3], edi
mov eax, dword [0x416a48]
mov dword [eax + 7], 0x186a1
mov ecx, dword [0x416a48]
mov dword [ecx + 0xb], ebx
mov edx, dword [0x416a48]
mov eax, dword [edx + 3]
add eax, edi
cmp eax, 7
mov dword [esp + 0x14], eax
jge 0x405736
nop
mov ecx, dword [0x416a48]
mov dword [ecx + eax*8 + 7], ebx
mov edx, dword [esp + 0x14]
mov eax, dword [0x416a48]
mov dword [eax + edx*8 + 0xb], ebx
mov eax, dword [esp + 0x14]
add eax, edi
cmp eax, 7
mov dword [esp + 0x14], eax
jl 0x405710
mov edx, dword [0x416a48]
mov ecx, 0x3f
mov word [edx + 1], cx
mov eax, dword [0x416a48]
movzx ecx, word [eax + 1]
mov edx, dword [0x416a40]
push ebx
push ecx
push eax
push edx
call sub.WSOCK32.dll_send
push 0x186a1
call fcn.00404f60
add esp, 4
call fcn.00405150
mov dword [esp + 0x10], eax
mov eax, dword [0x416c0c]
push eax
call sub.WSOCK32.dll_closesocket
mov ecx, dword [0x416a40]
push ecx
call sub.WSOCK32.dll_closesocket
cmp dword [0x415fc8], ebx
jne 0x4057b7
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x405250
mov ecx, dword [esp + 0xf4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405c9c
add esp, 0xe8
ret
or eax, 0xffffffff
jmp 0x40579e
push ebx
push str.CompleteGP
push str.Server_Version_Error
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call fcn.0040666a
int3