Function at 0x408150
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
push edi
xor edi, edi
push edi
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
mov al, byte [0x44e9cb]
add esp, 8
test al, al
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
mov byte [esp + 0x13], 0
je 0x408198
mov eax, dword [0x42e48c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.USER32.dll_EndDialog]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x30
ret
mov ecx, dword [0x425830]
mov edx, dword [ecx*4 + 0x41cd5c]
push edx
call fcn.00406270
add esp, 4
mov esi, 2
push edi
push 1
push esi
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [0x42e680], eax
jne 0x4081ec
push str.invalid_socket
call fcn.00406380
mov eax, dword [0x42e48c]
add esp, 4
push 0xffffffffffffffff
push eax
call dword [sym.imp.USER32.dll_EndDialog]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x30
ret
push 0xf
push eax
call fcn.004080c0
mov edx, dword [0x42e680]
add esp, 8
lea ecx, [esp + 0x20]
mov word [esp + 0x20], si
push 0x10
push ecx
push edx
mov dword [esp + 0x30], edi
mov word [esp + 0x2e], di
call dword [sym.imp.WSOCK32.dll_bind]
cmp eax, 0xffffffff
jne 0x408256
push str.Cant_bind_socket
call fcn.00406380
mov eax, dword [0x42e48c]
add esp, 4
push 0xffffffffffffffff
push eax
call dword [sym.imp.USER32.dll_EndDialog]
mov ecx, dword [0x42e680]
push ecx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov dword [0x42e680], edi
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x30
ret
mov ecx, dword [esp + 0x44]
mov word [esp + 0x20], si
mov al, byte [ecx]
cmp al, 0x30
jl 0x408281
cmp al, 0x39
jg 0x408281
push ecx
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x48]
mov dword [esp + 0x24], eax
jmp 0x408331
mov esi, dword [sym.imp.WSOCK32.dll_gethostbyname]
push ecx
call esi
mov ebx, eax
cmp ebx, edi
je 0x4082c5
mov eax, dword [ebx + 0xc]
xor esi, esi
cmp dword [eax], edi
je 0x4082a4
mov ecx, dword [eax + 4]
add eax, 4
inc esi
cmp ecx, edi
jne 0x408299
mov dword [esp + 0x14], esi
call dword [sym.imp.MSVCRT.dll_rand]
cdq
idiv esi
mov eax, dword [ebx + 0xc]
lea edi, [esp + 0x24]
movsx ecx, word [ebx + 0xa]
mov dword [esp + 0x18], edx
mov esi, dword [eax + edx*4]
jmp 0x40831d
mov ebp, dword [esp + 0x48]
mov byte [esp + 0x13], 1
mov al, byte [ebp]
cmp al, 0x30
jl 0x4082e6
cmp al, 0x39
jg 0x4082e6
push ebp
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [esp + 0x24], eax
jmp 0x408331
push ebp
call esi
mov edi, eax
test edi, edi
je 0x40832f
mov eax, dword [edi + 0xc]
xor esi, esi
cmp dword [eax], 0
je 0x408304
mov ecx, dword [eax + 4]
add eax, 4
inc esi
test ecx, ecx
jne 0x4082f9
movsx ebp, word [edi + 0xa]
call dword [sym.imp.MSVCRT.dll_rand]
cdq
idiv esi
mov eax, dword [edi + 0xc]
lea edi, [esp + 0x24]
mov ecx, ebp
mov esi, dword [eax + edx*4]
mov edx, ecx
mov ebp, dword [esp + 0x48]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor edi, edi
mov ax, word [0x41cd2a]
push eax
call dword [sym.imp.WSOCK32.dll_htons]
mov edx, dword [0x42e680]
lea ecx, [esp + 0x20]
push 0x10
push ecx
push edx
mov word [esp + 0x2e], ax
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
jne 0x408788
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov esi, eax
mov eax, dword [esp + 0x44]
mov al, byte [eax]
cmp al, 0x30
jl 0x4083ef
cmp al, 0x39
jg 0x4083ef
mov eax, dword [0x42e890]
cmp eax, 0xffffffff
je 0x4083b6
push str.updating_by_ip_n
push eax
call fcn.00406840
mov ecx, dword [0x42e890]
push esi
push str.error_code_:__d_n
push ecx
call fcn.00406840
mov edx, dword [esp + 0x58]
mov eax, dword [0x42e890]
push ebp
push edx
push str.host1_:__s_host2_:__s_n
push eax
call fcn.00406840
add esp, 0x24
push str.Cant_Connect
call fcn.00406380
mov ecx, dword [0x42e48c]
add esp, 4
push 0xffffffffffffffff
push ecx
call dword [sym.imp.USER32.dll_EndDialog]
mov edx, dword [0x42e680]
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov dword [0x42e680], edi
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x30
ret
mov eax, dword [0x42e890]
cmp eax, 0xffffffff
je 0x4084d7
push str.updating_by_dns__n
push eax
call fcn.00406840
mov eax, dword [0x42e890]
push esi
push str.error_code_:__d_n
push eax
call fcn.00406840
mov ecx, dword [esp + 0x58]
mov edx, dword [0x42e890]
push ebp
push ecx
push str.host1_:__s_host2_:__s__n
push edx
call fcn.00406840
mov al, byte [esp + 0x37]
add esp, 0x24
test al, al
je 0x408453
mov eax, dword [0x42e890]
push str.cant_get_host_by_host1_dns_n
push eax
call fcn.00406840
add esp, 8
jmp 0x4084d7
mov ecx, dword [0x42e890]
push str.cant_connect_dns_host_n
push ecx
call fcn.00406840
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x42e890]
push edx
push eax
push str.dns_total_:__d_dns_number_:__d__n
push ecx
call fcn.00406840
mov eax, dword [esp + 0x2c]
add esp, 0x18
xor ebp, ebp
test eax, eax
jle 0x4084d1
movsx ecx, word [ebx + 0xa]
mov edx, dword [ebx + 0xc]
mov eax, ecx
lea edi, [esp + 0x34]
mov esi, dword [edx + ebp*4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
mov edx, dword [0x42e890]
push eax
push str.ip_:__s__n
push edx
call fcn.00406840
mov eax, dword [esp + 0x20]
add esp, 0xc
inc ebp
cmp ebp, eax
jl 0x40848c
mov ebp, dword [esp + 0x48]
xor edi, edi
mov eax, dword [0x42e680]
mov esi, dword [sym.imp.WSOCK32.dll_closesocket]
push eax
call esi
push edi
push 1
push 2
mov dword [0x42e680], edi
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [0x42e680], eax
jne 0x408512
push str.invalid_socket
call fcn.00406380
add esp, 4
jmp 0x40888c
push 0xf
push eax
call fcn.004080c0
mov eax, dword [0x42e680]
add esp, 8
lea edx, [esp + 0x20]
mov word [esp + 0x20], 2
push 0x10
push edx
push eax
mov dword [esp + 0x30], edi
mov word [esp + 0x2e], di
call dword [sym.imp.WSOCK32.dll_bind]
cmp eax, 0xffffffff
jne 0x40857a
push str.Cant_bind_socket
call fcn.00406380
mov ecx, dword [0x42e48c]
add esp, 4
push 0xffffffffffffffff
push ecx
call dword [sym.imp.USER32.dll_EndDialog]
mov edx, dword [0x42e680]
push edx
call esi
mov dword [0x42e680], edi
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x30
ret
mov al, byte [ebp]
mov word [esp + 0x20], 2
cmp al, 0x30
jl 0x4085a1
cmp al, 0x39
jg 0x4085a1
push ebp
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
jmp 0x408611
push ebp
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ebx, eax
cmp ebx, edi
je 0x4085f3
mov eax, dword [ebx + 0xc]
xor esi, esi
cmp dword [eax], edi
je 0x4085c2
mov ecx, dword [eax + 4]
add eax, 4
inc esi
cmp ecx, edi
jne 0x4085b7
mov dword [esp + 0x14], esi
call dword [sym.imp.MSVCRT.dll_rand]
cdq
idiv esi
movsx ecx, word [ebx + 0xa]
mov eax, dword [ebx + 0xc]
lea edi, [esp + 0x24]
mov dword [esp + 0x18], edx
mov esi, dword [eax + edx*4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor edi, edi
jmp 0x408611
mov eax, dword [0x44e9dc]
mov byte [esp + 0x13], 1
cmp eax, 1
jne 0x408611
push str.63.104.49.23
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [esp + 0x24], eax
mov ax, word [0x41cd2a]
push eax
call dword [sym.imp.WSOCK32.dll_htons]
mov edx, dword [0x42e680]
lea ecx, [esp + 0x20]
push 0x10
push ecx
push edx
mov word [esp + 0x2e], ax
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
jne 0x408788
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov esi, eax
mov eax, dword [0x42e890]
cmp eax, 0xffffffff
je 0x408750
push str.updating_by_entry_2__n
push eax
call fcn.00406840
mov eax, dword [0x42e890]
push esi
push str.error_code_:__d_n
push eax
call fcn.00406840
mov ecx, dword [esp + 0x58]
mov edx, dword [0x42e890]
push ebp
push ecx
push str.host1_:__s_host2_:__s__n
push edx
call fcn.00406840
mov al, byte [ebp]
add esp, 0x24
cmp al, 0x30
jl 0x4086af
cmp al, 0x39
jg 0x4086af
mov eax, dword [0x42e890]
push str.cant_connect_host_2__n
push eax
call fcn.00406840
add esp, 8
jmp 0x408750
mov al, byte [esp + 0x13]
test al, al
je 0x4086d0
mov ecx, dword [0x42e890]
push str.cant_get_host_by_dns_2__n
push ecx
call fcn.00406840
add esp, 8
jmp 0x408750
mov edx, dword [0x42e890]
push str.cant_connect_dns_2_host__n
push edx
call fcn.00406840
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [0x42e890]
push eax
push ecx
push str.dns_2_total_:__d_dns_2_number_:__d__n
push edx
call fcn.00406840
mov eax, dword [esp + 0x2c]
add esp, 0x18
xor ebp, ebp
test eax, eax
jle 0x40874e
movsx ecx, word [ebx + 0xa]
mov eax, dword [ebx + 0xc]
mov edx, ecx
lea edi, [esp + 0x34]
mov esi, dword [eax + ebp*4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
mov ecx, dword [0x42e890]
push eax
push str.ip_:__s__n
push ecx
call fcn.00406840
mov eax, dword [esp + 0x20]
add esp, 0xc
inc ebp
cmp ebp, eax
jl 0x408709
xor edi, edi
push str.Cant_Connect
call fcn.00406380
mov edx, dword [0x42e48c]
add esp, 4
push 0xffffffffffffffff
push edx
call dword [sym.imp.USER32.dll_EndDialog]
mov eax, dword [0x42e680]
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
mov dword [0x42e680], edi
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x30
ret
mov ecx, dword [0x425830]
mov edx, dword [ecx*4 + 0x41cd6c]
push edx
call fcn.00406270
push 4
push 0x41cd0c
push edi
call fcn.004064a0
mov eax, dword [0x41cd04]
mov esi, dword [sym.imp.WSOCK32.dll_htonl]
add esp, 0x10
mov dword [0x42e670], 1
push eax
call esi
lea ecx, [esp + 0x1c]
push 4
push ecx
mov dword [esp + 0x24], eax
call fcn.00406f20
add esp, 8
test al, al
je 0x4087e7
push 0x41cd00
call fcn.00406e50
add esp, 4
mov al, byte [0x42e898]
test al, al
jne 0x408852
cmp dword [0x44e9b8], edi
jle 0x408852
mov edx, dword [0x425830]
mov dword [0x42e670], 2
mov eax, dword [edx*4 + 0x41cddc]
push eax
call fcn.00406270
push 4
push 0x41cd1c
push edi
call fcn.004064a0
mov ecx, dword [0x41cd14]
add esp, 0x10
push ecx
call esi
lea edx, [esp + 0x1c]
push 4
push edx
mov dword [esp + 0x24], eax
call fcn.00406f20
add esp, 8
test al, al
je 0x408852
push 0x41cd10
call fcn.00406e50
add esp, 4
mov eax, dword [0x42e680]
mov dword [0x42e670], edi
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, dword [0x425a40]
mov dword [0x42e680], edi
cmp eax, edi
je 0x408887
push eax
call dword [sym.imp.MSVCRT.dll__close]
push 0x425838
call fcn.00406b90
add esp, 8
call fcn.00407e70
mov ecx, dword [0x42e48c]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.USER32.dll_EndDialog]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x30
ret