Function at 0x40ba70
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a1d65
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x60fec0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov dword [ebp - 0x64], 1
movlpd qword [ebp - 0x5c], xmm0
movlpd qword [ebp - 0x54], xmm0
mov dword [ebp - 0x60], esi
cmp dword [edx + 0x10], esi
je 0x40bae3
cmp dword [edx + 0x14], 0x10
mov esi, edx
jb 0x40bad3
mov esi, dword [edx]
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x6c], 4
jmp 0x40bafe
cmp dword [eax + 0x10], esi
je 0x40baf2
cmp dword [eax + 0x14], 0x10
mov esi, eax
jb 0x40baf2
mov esi, dword [eax]
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x13]
test ecx, ecx
jns 0x40bb18
neg ecx
push ecx
push eax
call fcn.0040b8b0
add esp, 8
mov byte [eax - 1], 0x2d
dec eax
jmp 0x40bb22
push ecx
push eax
call fcn.0040b8b0
add esp, 8
lea ecx, [ebp - 0x45]
push ecx
lea ecx, [ebp - 0x13]
push ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.004088c0
cmp dword [ebp - 0x2c], 0x10
lea ecx, [ebp - 0x4c]
push ecx
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push ecx
push eax
push esi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x40bc16
mov esi, dword [ebp - 0x4c]
test esi, esi
je 0x40bc0f
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
nop dword [eax + eax]
push 0x81
push 0
push 0
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40bba5
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x40bc01
cmp byte [ebp + 0x1c], 0
je 0x40bbbf
push 4
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 1
push eax
push 1
push 6
push edi
call ebx
mov ecx, dword [ebp + 0x44]
test ecx, ecx
je 0x40bbd2
mov dword [ebp - 0x44], edi
lea edx, [ebp - 0x44]
mov eax, dword [ecx]
push edx
call dword [eax + 8]
cmp dword [esi + 4], 0x17
jne 0x40bbec
push 4
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
push 0x1b
push 0x29
push edi
call ebx
push esi
push edi
lea ecx, [ebp + 0x48]
call fcn.00411b20
test al, al
jne 0x40bc41
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x40bb70
mov esi, dword [ebp - 0x4c]
push esi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
or edi, 0xffffffff
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0x10
jb 0x40bc56
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40bc4c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40bc9e
jmp 0x40bc4c
push dword [ebp - 0x4c]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x40bc19
push ecx
push edx
call fcn.00574884
add esp, 8
mov ecx, dword [ebp + 0x44]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
test ecx, ecx
je 0x40bc80
mov esi, dword [ecx]
lea eax, [ebp + 0x20]
cmp ecx, eax
setne dl
movzx edx, dl
push edx
call dword [esi + 0x10]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00574853
mov esp, ebp
pop ebp
ret
call fcn.0057fa40
int3