Function at 0x40bd20
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x48e4f0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov ecx, dword [ebx + 0x2c]
push edi
xor edi, edi
mov dword [ebp - 0x20], ebx
mov esi, edx
cmp ecx, edi
je 0x40bd89
mov edx, dword [ebp + 8]
mov eax, dword [ecx]
mov eax, dword [eax + 0x24]
push edx
push esi
call eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], edi
jne 0x40bd64
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40bd70
mov edx, 2
mov ecx, ebx
call fcn.0040c4c0
mov eax, dword [ebp - 0x18]
lea esp, [ebp - 0x4c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004593ed
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx + 0xc]
cmp eax, 2
jne 0x40be4c
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
cmp esi, edi
jne 0x40bdab
xor esi, esi
jmp 0x40bddd
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40bdbe
xor esi, esi
jmp 0x40bddd
lea edi, [eax + eax]
mov eax, edi
call fcn.00469cd0
mov eax, esi
mov edx, 3
mov ecx, edi
mov esi, esp
mov dword [ebp - 0x1c], esp
call fcn.0040b8a0
mov esi, eax
mov ecx, 2
push esi
mov word [ebp - 0x14], cx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x40be17
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40be0c
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [ebp - 0x10], ecx
jmp 0x40be17
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
push 0x10
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebx + 4]
call fcn.0040a790
push eax
call dword [sym.imp.WS2_32.dll_connect]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
xor edi, edi
mov dword [ebp - 0x18], ecx
jmp 0x40bd52
cmp eax, 0x17
je 0x40be59
cmp eax, edi
jne 0x40bd52
cmp dword [0x491224], edi
jne 0x40be73
push 0x273b
call dword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
jmp 0x40bd73
mov edx, dword [ebx + 0x1c]
push edx
call dword [0x491228]
mov ecx, dword [ebp + 8]
xor eax, eax
push ecx
push 0x47e9dc
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 0xc]
lea edx, [ebp - 0x10]
push 9
push edx
mov dword [ebx + 0x20], edi
mov dword [ebx + 0x1c], edi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x40], edi
call fcn.00459e7e
add esp, 0x10
cmp esi, edi
jne 0x40becc
xor eax, eax
jmp 0x40befc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40bedf
xor eax, eax
jmp 0x40befc
lea edi, [eax + eax]
mov eax, edi
call fcn.00469cd0
mov eax, esi
mov edx, 3
mov ecx, edi
mov esi, esp
mov dword [ebp - 0x18], esp
call fcn.0040b8a0
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x40]
push edx
lea ecx, [ebp - 0x10]
push ecx
push eax
call dword [0x491224]
test eax, eax
jne 0x40be6c
mov esi, dword [ebp - 0x1c]
xor edi, edi
cmp esi, edi
je 0x40c086
cmp dword [ebx + 0xc], edi
jne 0x40bf3d
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_socket]
jmp 0x40bf45
mov eax, dword [ebx + 4]
call fcn.0040a790
cmp eax, 0xffffffff
jne 0x40bf52
mov dword [ebp - 0x18], edi
jmp 0x40c076
cmp dword [ebx + 0xc], edi
jne 0x40c02e
mov edx, dword [ebx + 4]
mov dword [edx + 4], eax
mov edi, dword [ebx + 4]
call fcn.00409810
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebx + 4]
call fcn.0040a5c0
test eax, eax
jne 0x40bf8e
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov dword [ebp - 0x18], 0
jmp 0x40c076
mov edx, dword [ebx + 4]
cmp dword [edx + 0x38], 0
je 0x40bfce
mov eax, dword [edx + 8]
add eax, 0x403
push 0x3f
push eax
mov eax, edx
call fcn.0040a7a0
mov ecx, dword [edx + 4]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
test eax, eax
je 0x40bfce
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
call eax
mov dword [ebp - 0x18], 0
jmp 0x40c076
mov eax, dword [ebx + 4]
cmp dword [eax + 0x4c], 0
je 0x40bfee
mov ecx, dword [eax + 8]
push 0
push ecx
push 0x402
call fcn.0040a7a0
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
cmp dword [ebx + 0xc], 0
jne 0x40c02e
mov eax, dword [esi + 4]
mov edx, dword [ebx + 4]
mov dword [ebx + 0xc], eax
mov dword [edx + 0xc], eax
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x14]
mov ebx, dword [ebx + 4]
push eax
call fcn.00409550
test eax, eax
jne 0x40c02b
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 4]
mov dword [ecx + 0xc], eax
mov dword [edx + 0xc], eax
mov eax, dword [ecx]
mov edx, dword [eax + 0x1c]
call edx
mov ebx, dword [ebp - 0x20]
jmp 0x40c076
mov ebx, dword [ebp - 0x20]
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x18]
push eax
mov eax, dword [ebx + 4]
push ecx
call fcn.0040a790
push eax
call dword [sym.imp.WS2_32.dll_connect]
xor edx, edx
cmp eax, 0xffffffff
setne dl
xor edi, edi
mov eax, edx
mov dword [ebp - 0x18], eax
cmp eax, edi
jne 0x40c0a6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x40c0a6
cmp dword [ebp - 0x3c], edi
jne 0x40c076
mov eax, dword [ebx]
mov edx, dword [eax + 0x1c]
mov ecx, ebx
mov dword [ebx + 0xc], edi
call edx
mov esi, dword [esi + 0x1c]
xor edi, edi
cmp esi, edi
jne 0x40bf24
mov esi, dword [ebp - 0x1c]
push esi
call dword [0x491228]
mov eax, dword [ebx + 4]
call fcn.0040a790
cmp eax, 0xffffffff
jne 0x40bd52
mov dword [ebp - 0x18], edi
jmp 0x40bd57
mov eax, dword [esi + 4]
mov ecx, dword [ebx + 4]
mov dword [ebx + 0xc], eax
mov edx, dword [esi + 4]
mov dword [ecx + 0xc], edx
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x18], 1
cmp eax, edi
je 0x40c086
mov dword [ebx + 0x1c], esi
mov dword [ebx + 0x20], eax
jmp 0x40c08d