Function at 0x45cf1c
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x4f
push 0
push 0
dec ecx
jne 0x45cf25
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 0x15], dl
mov edi, eax
mov eax, dword [ebp - 0x1c]
call fcn.0040404c
mov eax, dword [ebp + 0x14]
call fcn.0040404c
xor eax, eax
push ebp
push 0x45d7bc
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [edi + 0x10], 0
jne 0x45d74b
mov eax, dword [ebp + 0xc]
mov dword [edi + 0xe0], eax
cmp byte [edi + 0xe4], 0
jne 0x45cf82
test eax, eax
jne 0x45cf82
mov dword [edi + 0xe0], 0x1e
cmp byte [ebp - 0x15], 4
jne 0x45cf92
mov esi, 0xfffffffe
jmp 0x45d750
cmp byte [ebp - 0x15], 1
je 0x45cf9e
cmp byte [ebp + 8], 0
je 0x45cfc3
cmp word [0x46f044], 0
jne 0x45cfc3
push 0x46f044
push 0x101
call sub.wsock32.dll_WSAStartup
test eax, eax
je 0x45cfc3
or esi, 0xffffffff
jmp 0x45d750
or esi, 0xffffffff
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
call fcn.00403cb0
lea eax, [ebp - 0x28]
mov edx, dword [ebp + 0x14]
call fcn.00403cb0
cmp byte [ebp - 0x15], 3
jne 0x45d026
cmp dword [ebp - 0x1c], 0
je 0x45cff7
mov eax, dword [ebp - 0x1c]
mov edx, 0x45d7d8
call fcn.00403fa8
je 0x45d004
lea eax, [ebp - 0x1c]
mov edx, 0x45d7d8
call fcn.00403cb0
cmp dword [ebp + 0x14], 0
je 0x45d019
mov eax, dword [ebp + 0x14]
mov edx, 0x45d7e4
call fcn.00403fa8
je 0x45d026
lea eax, [ebp + 0x14]
mov edx, 0x45d7e4
call fcn.00403cb0
cmp byte [ebp - 0x15], 3
jne 0x45d3ca
cmp dword [ebp - 0x1c], 0
je 0x45d045
mov eax, dword [ebp - 0x1c]
mov edx, 0x45d7d8
call fcn.00403fa8
je 0x45d062
cmp dword [ebp + 0x14], 0
je 0x45d3ca
mov eax, dword [ebp + 0x14]
mov edx, 0x45d7e4
call fcn.00403fa8
jne 0x45d3ca
push 0x45d7f4
push dword [ebp - 0x1c]
push 0x45d800
push dword [ebp + 0x14]
lea eax, [ebp - 0x12c]
mov edx, 4
call fcn.00403f58
mov edx, dword [ebp - 0x12c]
lea eax, [ebp - 0x128]
mov ecx, 0xff
call fcn.00403e74
mov ebx, 0x65
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x128]
inc eax
push eax
call sub.kernel32.dll_CreateFileA_2
mov esi, eax
cmp esi, 0xffffffff
jne 0x45d234
call sub.kernel32.dll_GetLastError_2
cmp eax, 0xe7
je 0x45d174
mov eax, 0x7e1
mov dword [edi + 0xdc], eax
lea eax, [ebp - 0x230]
push eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x248], eax
mov byte [ebp - 0x244], 0xb
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x240], eax
mov byte [ebp - 0x23c], 0xb
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x238], eax
mov byte [ebp - 0x234], 0
lea edx, [ebp - 0x248]
mov eax, dword [0x46d040]
mov ecx, dword [edi + 0xdc]
mov eax, dword [eax + ecx*4 - 0x1f40]
mov ecx, 2
call fcn.00408eac
mov edx, dword [ebp - 0x230]
lea eax, [ebp - 0x22c]
mov ecx, 0xff
call fcn.00403e74
lea edx, [ebp - 0x22c]
lea eax, [edi + 0x11]
mov cl, 0xc8
call fcn.00402a7c
cmp byte [ebp + 8], 0
jne 0x45d234
mov esi, 0xfffffff7
jmp 0x45d750
imul eax, dword [ebp + 0xc], 0x3e8
push eax
lea eax, [ebp - 0x128]
inc eax
push eax
call sub.kernel32.dll_WaitNamedPipeA
test eax, eax
jne 0x45d22d
mov eax, 0x7e0
mov dword [edi + 0xdc], eax
lea eax, [ebp - 0x24c]
push eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x248], eax
mov byte [ebp - 0x244], 0xb
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x240], eax
mov byte [ebp - 0x23c], 0xb
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x238], eax
mov byte [ebp - 0x234], 0
lea edx, [ebp - 0x248]
mov eax, dword [0x46d040]
mov ecx, dword [edi + 0xdc]
mov eax, dword [eax + ecx*4 - 0x1f40]
mov ecx, 2
call fcn.00408eac
mov edx, dword [ebp - 0x24c]
lea eax, [ebp - 0x22c]
mov ecx, 0xff
call fcn.00403e74
lea edx, [ebp - 0x22c]
lea eax, [edi + 0x11]
mov cl, 0xc8
call fcn.00402a7c
cmp byte [ebp + 8], 0
jne 0x45d234
mov esi, 0xfffffff7
jmp 0x45d750
dec ebx
jne 0x45d09d
cmp esi, 0xffffffff
jne 0x45d2d9
mov eax, 0x7e1
mov dword [edi + 0xdc], eax
lea eax, [ebp - 0x250]
push eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x248], eax
mov byte [ebp - 0x244], 0xb
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x240], eax
mov byte [ebp - 0x23c], 0xb
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x238], eax
mov byte [ebp - 0x234], 0
lea edx, [ebp - 0x248]
mov eax, dword [0x46d040]
mov ecx, dword [edi + 0xdc]
mov eax, dword [eax + ecx*4 - 0x1f40]
mov ecx, 2
call fcn.00408eac
mov edx, dword [ebp - 0x250]
lea eax, [ebp - 0x22c]
mov ecx, 0xff
call fcn.00403e74
lea edx, [ebp - 0x22c]
lea eax, [edi + 0x11]
mov cl, 0xc8
call fcn.00402a7c
cmp byte [ebp + 8], 0
jne 0x45d2d9
mov esi, 0xfffffff7
jmp 0x45d750
cmp esi, 0xffffffff
je 0x45d3a2
xor eax, eax
mov dword [ebp - 0x20], eax
push 0
push 0
lea eax, [ebp - 0x20]
push eax
push esi
call sub.kernel32.dll_SetNamedPipeHandleState
test eax, eax
jne 0x45d3a2
push esi
call sub.kernel32.dll_CloseHandle_2
or esi, 0xffffffff
mov eax, 0x7e2
mov dword [edi + 0xdc], eax
lea eax, [ebp - 0x254]
push eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x248], eax
mov byte [ebp - 0x244], 0xb
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x240], eax
mov byte [ebp - 0x23c], 0xb
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x238], eax
mov byte [ebp - 0x234], 0
lea edx, [ebp - 0x248]
mov eax, dword [0x46d040]
mov ecx, dword [edi + 0xdc]
mov eax, dword [eax + ecx*4 - 0x1f40]
mov ecx, 2
call fcn.00408eac
mov edx, dword [ebp - 0x254]
lea eax, [ebp - 0x22c]
mov ecx, 0xff
call fcn.00403e74
lea edx, [ebp - 0x22c]
lea eax, [edi + 0x11]
mov cl, 0xc8
call fcn.00402a7c
cmp byte [ebp + 8], 0
jne 0x45d3a2
mov esi, 0xfffffff7
jmp 0x45d750
cmp esi, 0xffffffff
jne 0x45d3b7
cmp byte [ebp + 8], 0
jne 0x45d3ca
mov esi, 0xfffffff7
jmp 0x45d750
mov byte [edi + 0x10], 3
xor eax, eax
mov dword [edi + 4], eax
mov dword [edi + 8], esi
xor esi, esi
jmp 0x45d750
inc esi
jne 0x45d3d3
cmp byte [ebp - 0x15], 3
je 0x45d3dd
cmp byte [ebp + 8], 0
je 0x45d736
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0x24]
call fcn.00403cb0
lea eax, [ebp + 0x14]
mov edx, dword [ebp - 0x28]
call fcn.00403cb0
cmp dword [ebp + 0x10], 0
jne 0x45d400
mov dword [ebp + 0x10], 0xcea
cmp dword [ebp - 0x1c], 0
jne 0x45d413
lea eax, [ebp - 0x1c]
mov edx, 0x45d810
call fcn.00403cb0
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x45d492
mov ebx, 0x7d4
mov dword [edi + 0xdc], ebx
lea eax, [ebp - 0x258]
push eax
call sub.wsock32.dll_WSAGetLastError
mov dword [ebp - 0x260], eax
mov byte [ebp - 0x25c], 0
lea edx, [ebp - 0x260]
mov eax, dword [0x46d040]
mov eax, dword [eax + ebx*4 - 0x1f40]
xor ecx, ecx
call fcn.00408eac
mov edx, dword [ebp - 0x258]
lea eax, [ebp - 0x22c]
mov ecx, 0xff
call fcn.00403e74
lea edx, [ebp - 0x22c]
lea eax, [edi + 0x11]
mov cl, 0xc8
call fcn.00402a7c
mov esi, 0xfffffff8
jmp 0x45d750
xor edx, edx
mov eax, edi
call fcn.0045ce58
lea eax, [ebp - 0x14]
xor ecx, ecx
mov edx, 0x10
call fcn.00402ba0
mov word [ebp - 0x14], 2
mov eax, dword [ebp - 0x1c]
call fcn.0040405c
mov esi, eax
push esi
call sub.wsock32.dll_inet_addr
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x45d4d4
mov eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
jmp 0x45d595
push esi
call sub.wsock32.dll_gethostbyname
test eax, eax
jne 0x45d562
mov ebx, 0x7d5
mov dword [edi + 0xdc], ebx
lea eax, [ebp - 0x264]
push eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x274], eax
mov byte [ebp - 0x270], 0xb
call sub.wsock32.dll_WSAGetLastError
mov dword [ebp - 0x26c], eax
mov byte [ebp - 0x268], 0
lea edx, [ebp - 0x274]
mov eax, dword [0x46d040]
mov eax, dword [eax + ebx*4 - 0x1f40]
mov ecx, 1
call fcn.00408eac
mov edx, dword [ebp - 0x264]
lea eax, [ebp - 0x22c]
mov ecx, 0xff
call fcn.00403e74
lea edx, [ebp - 0x22c]
lea eax, [edi + 0x11]
mov cl, 0xc8
call fcn.00402a7c
mov esi, 0xfffffff9
jmp 0x45d750
mov edx, dword [eax + 0xc]
mov edx, dword [edx]
xor ecx, ecx
mov cl, byte [edx]
movzx esi, byte [edx + 1]
shl esi, 8
add ecx, esi
movzx esi, byte [edx + 2]
shl esi, 0x10
add ecx, esi
movzx edx, byte [edx + 3]
shl edx, 0x18
add ecx, edx
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
mov dword [ebp - 0x10], edx
mov word [eax + 0xa], 0xa
mov eax, dword [ebp + 0x10]
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x12], ax
mov dword [edi + 4], ebx
mov byte [edi + 0x10], 1
xor edx, edx
mov eax, edi
call fcn.0045ce58
push 0x10
lea eax, [ebp - 0x14]
push eax
push ebx
call sub.wsock32.dll_connect
test eax, eax
jge 0x45d664
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x45d664
xor eax, eax
mov dword [edi + 4], eax
mov byte [edi + 0x10], 0
xor eax, eax
mov dword [edi + 0xc], eax
mov ebx, 0x7d3
mov dword [edi + 0xdc], ebx
lea eax, [ebp - 0x278]
push eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x274], eax
mov byte [ebp - 0x270], 0xb
call sub.wsock32.dll_WSAGetLastError
mov dword [ebp - 0x26c], eax
mov byte [ebp - 0x268], 0
lea edx, [ebp - 0x274]
mov eax, dword [0x46d040]
mov eax, dword [eax + ebx*4 - 0x1f40]
mov ecx, 1
call fcn.00408eac
mov edx, dword [ebp - 0x278]
lea eax, [ebp - 0x22c]
mov ecx, 0xff
call fcn.00403e74
lea edx, [ebp - 0x22c]
lea eax, [edi + 0x11]
mov cl, 0xc8
call fcn.00402a7c
mov esi, 0xfffffffa
jmp 0x45d750
mov eax, edi
call fcn.0045cda4
mov dl, 1
mov eax, edi
call fcn.0045cdfc
mov ebx, dword [edi + 0xe0]
test ebx, ebx
je 0x45d71e
mov edx, ebx
mov eax, edi
call fcn.0045d81c
test al, al
jne 0x45d71e
xor eax, eax
mov dword [edi + 4], eax
mov byte [edi + 0x10], 0
xor eax, eax
mov dword [edi + 0xc], eax
mov ebx, 0x7d3
mov dword [edi + 0xdc], ebx
lea eax, [ebp - 0x27c]
push eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x274], eax
mov byte [ebp - 0x270], 0xb
call sub.wsock32.dll_WSAGetLastError
mov dword [ebp - 0x26c], eax
mov byte [ebp - 0x268], 0
lea edx, [ebp - 0x274]
mov eax, dword [0x46d040]
mov eax, dword [eax + ebx*4 - 0x1f40]
mov ecx, 1
call fcn.00408eac
mov edx, dword [ebp - 0x27c]
lea eax, [ebp - 0x22c]
mov ecx, 0xff
call fcn.00403e74
lea edx, [ebp - 0x22c]
lea eax, [edi + 0x11]
mov cl, 0xc8
call fcn.00402a7c
mov esi, 0xfffffff9
jmp 0x45d750
cmp byte [edi + 0xe4], 0
je 0x45d736
cmp byte [edi + 0x10], 1
jne 0x45d736
mov dl, 1
mov eax, edi
call fcn.0045ce58
xor eax, eax
mov dword [edi + 8], eax
xor esi, esi
mov byte [edi + 0x11], 0
xor eax, eax
mov dword [edi + 0xdc], eax
jmp 0x45d750
mov esi, 0xffffffec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45d7c3
lea eax, [ebp - 0x27c]
mov edx, 2
call fcn.00403c3c
lea eax, [ebp - 0x264]
call fcn.00403c18
lea eax, [ebp - 0x258]
mov edx, 4
call fcn.00403c3c
lea eax, [ebp - 0x230]
call fcn.00403c18
lea eax, [ebp - 0x12c]
call fcn.00403c18
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00403c3c
lea eax, [ebp - 0x1c]
call fcn.00403c18
lea eax, [ebp + 0x14]
call fcn.00403c18
ret