Function at 0x40ba70
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x744
mov eax, dword [esp + 0x748]
push esi
push eax
push 0x495568
lea ecx, [esp + 0x350]
push 0x48299c
push ecx
mov dword [esp + 0x18], 0
call fcn.00436cce
lea edx, [esp + 0x358]
push 0x482ab8
push edx
call fcn.00436ea0
mov esi, eax
add esp, 0x18
test esi, esi
mov dword [esp + 0x20], esi
jne 0x40bac5
pop esi
add esp, 0x744
ret
mov al, byte [esi + 0xc]
push ebx
push ebp
push edi
test al, 0x10
jne 0x40bd88
mov ebp, 0x47882c
mov eax, 0x4787f8
mov ebx, ebp
mov dword [esp + 0x1c], eax
sub ebx, 0x100
sub eax, 2
mov dword [esp + 0x18], str.SERV_1
mov dword [esp + 0x10], eax
push esi
lea eax, [esp + 0x158]
push 0x100
push eax
call fcn.004372c0
mov al, byte [esi + 0xc]
add esp, 0xc
test al, 0x10
jne 0x40bd88
lea edi, [esp + 0x154]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x254]
repne scasb al, byte es:[edi]
not ecx
push edx
lea eax, [esp + 0x38]
lea edx, [esp + 0x58]
dec ecx
push eax
push edx
lea eax, [esp + 0x160]
push ecx
push eax
call fcn.0040b450
mov ecx, eax
add esp, 0x14
dec ecx
je 0x40bc25
dec ecx
je 0x40bbd7
dec ecx
jne 0x40bc84
lea edi, [esp + 0x54]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x34]
mov edx, ecx
mov esi, edi
mov edi, ebp
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004371fb
mov edx, dword [esp + 0x20]
lea edi, [esp + 0x258]
or ecx, 0xffffffff
add esp, 4
mov word [edx], ax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
add edx, 2
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x14]
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x14], eax
add esi, 2
jmp 0x40bc64
lea edi, [esp + 0x54]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x34]
mov edx, ecx
mov esi, edi
mov edi, ebp
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004371fb
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
add esp, 4
mov word [ecx], ax
mov eax, dword [esp + 0x14]
inc eax
add ecx, 2
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ecx
add esi, 2
jmp 0x40bc64
lea edi, [esp + 0x54]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x14]
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, 2
add edi, eax
add esi, eax
mov dword [esp + 0x1c], edi
mov edx, dword [esp + 0x18]
add ebp, 0x100
add edx, 0x100
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], edx
add ebx, 0x100
jmp 0x40bc8c
test eax, eax
je 0x40bd6f
mov ecx, dword [0x47c384]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], eax
jle 0x40bd6f
mov dword [esp + 0x20], 0x4775e4
mov edi, 0x4775f8
mov esi, dword [sym.imp.WSOCK32.dll_gethostbyname]
push ebx
call esi
test eax, eax
jne 0x40bccb
push ebx
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [esp + 0x28], eax
jmp 0x40bcd6
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [esp + 0x28], edx
push edi
call esi
test eax, eax
jne 0x40bce6
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
jmp 0x40bced
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov eax, dword [ecx]
mov edx, dword [esp + 0x10]
mov cx, word [edx]
mov edx, dword [esp + 0x20]
cmp cx, word [edx]
jne 0x40bd07
cmp dword [esp + 0x28], eax
jne 0x40bd07
inc dword [esp + 0x24]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x20]
mov ecx, dword [0x47c384]
inc eax
add edi, 0x100
add edx, 2
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], edx
jl 0x40bcb1
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40bd6f
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
dec eax
sub edx, 0x100
mov dword [esp + 0x14], eax
mov eax, 2
sub edi, eax
sub esi, eax
sub ebp, 0x100
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], edx
sub ebx, 0x100
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
cmp eax, 0x478828
jge 0x40bd88
test byte [esi + 0xc], 0x10
je 0x40baf8
push esi
call fcn.00436d20
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x744
ret