Function at 0x40241c
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get networking parameters
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2c64
call fcn.00405608
push esi
push edi
push dword [ebp + 8]
call sub.CRTDLL.DLL_strlen
add esp, 4
mov edi, eax
add edi, 0x14
mov dword [ebp - 0x2b18], edi
mov dword [ebp - 0x2b1c], 0
push 0x200
lea edi, [ebp - 0x2b14]
push edi
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x2800
lea edi, [ebp - 0x2804]
push edi
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x100
lea edi, [ebp - 0x2904]
push edi
call sub.KERNEL32.DLL_RtlZeroMemory
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x40291c
imul edi, dword [ebp + 0x14], 0x61c
mov esi, dword [ebp - 4]
mov dword [edi + 0x4088f8], esi
mov word [ebp - 0x2914], 2
push 0x35
call sub.wsock32.dll_htons
mov edi, eax
mov word [ebp - 0x2912], di
push 0x800
call sub.CRTDLL.DLL_malloc
add esp, 4
mov dword [ebp - 0x2c28], eax
mov dword [ebp - 0x2c34], 0x800
push 4
lea edi, [ebp - 0x2b20]
push edi
call sub.KERNEL32.DLL_RtlZeroMemory
lea edi, [ebp - 0x2c34]
push edi
push dword [ebp - 0x2c28]
call sub.iphlpapi.DLL_GetNetworkParams
mov dword [ebp - 0x2c38], eax
cmp dword [ebp - 0x2c38], 0
je 0x40251e
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402942
push str.212.5.86.163
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x2910], eax
mov edi, dword [ebp - 0x2c28]
add edi, 0x10c
mov dword [ebp - 0x2b20], edi
jmp 0x402573
cmp dword [ebp - 0x2b20], 0
je 0x402560
mov edi, dword [ebp - 0x2b20]
add edi, 4
push edi
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x2910], eax
mov edi, dword [ebp - 0x2b20]
mov edi, dword [edi]
mov dword [ebp - 0x2b20], edi
cmp dword [ebp - 0x2b20], 0
jne 0x402542
mov dword [ebp - 0x2c30], 0
mov dword [ebp - 0x2c2c], 1
lea edi, [ebp - 0x2c2c]
push edi
mov edi, 0x80040000
or edi, 0x6600
or edi, 0x7e
push edi
push dword [ebp - 4]
call sub.wsock32.dll_ioctlsocket
push 0x10
lea edi, [ebp - 0x2914]
push edi
push dword [ebp - 4]
call sub.wsock32.dll_connect
cmp eax, 0xffffffff
jne 0x402649
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x402649
mov dword [ebp - 0x2c24], 0
cmp dword [ebp - 0x2c24], 0x40
jae 0x402602
mov edi, dword [ebp - 0x2c24]
mov esi, edi
add esi, 1
mov dword [ebp - 0x2c24], esi
mov esi, dword [ebp - 4]
mov dword [ebp + edi*4 - 0x2c20], esi
mov eax, dword [ebp + 0x10]
mov ecx, 0x3e8
cdq
idiv ecx
mov dword [ebp - 0x2c40], eax
mov eax, dword [ebp + 0x10]
mov ecx, 0x3e8
cdq
idiv ecx
imul edi, edx, 0x3e8
mov dword [ebp - 0x2c3c], edi
lea edi, [ebp - 0x2c40]
push edi
push 0
lea edi, [ebp - 0x2c24]
push edi
push 0
push 0
call sub.wsock32.dll_select
mov dword [ebp - 0x2c30], eax
mov dword [ebp - 0x2c2c], 0
lea edi, [ebp - 0x2c2c]
push edi
mov edi, 0x80040000
or edi, 0x6600
or edi, 0x7e
push edi
push dword [ebp - 4]
call sub.wsock32.dll_ioctlsocket
cmp dword [ebp - 0x2c30], 0
jle 0x40290d
lea edi, [ebp - 0x2b14]
push edi
push dword [ebp + 8]
call fcn.00402946
add esp, 8
cmp eax, 0
je 0x4026a7
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402942
push 0
push dword [ebp - 0x2b18]
lea edi, [ebp - 0x2b14]
push edi
push dword [ebp - 4]
call sub.wsock32.dll_send
cmp eax, 0xffffffff
jne 0x4026d5
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402942
push 0
push 0x27ff
lea edi, [ebp - 0x2804]
push edi
push dword [ebp - 4]
call sub.wsock32.dll_recv
mov dword [ebp - 0x2b1c], eax
cmp dword [ebp - 0x2b1c], 0
jne 0x40270c
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402942
push 0xc
lea edi, [ebp - 0x2c62]
push edi
call sub.KERNEL32.DLL_RtlZeroMemory
lea edi, [ebp - 0x2802]
mov dword [ebp - 0x2c44], edi
push 0xc
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2c62]
push edi
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
movzx edi, word [ebp - 0x2c5c]
push edi
call sub.wsock32.dll_ntohs
mov edi, eax
and edi, 0xffff
mov dword [ebp - 0x2c54], edi
cmp dword [ebp - 0x2c54], 0
jne 0x402773
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402942
mov word [ebp - 0x2c56], 0
mov edi, dword [ebp - 0x2b18]
lea edi, [ebp + edi - 0x2804]
mov dword [ebp - 0x2c44], edi
mov dword [ebp - 0x2c4c], 0
jmp 0x4028f9
push 0xff
lea edi, [ebp - 0x2904]
push edi
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2804]
push edi
call fcn.00402af3
add esp, 0x10
mov edi, eax
add edi, dword [ebp - 0x2c44]
mov dword [ebp - 0x2c44], edi
push 2
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2c4e]
push edi
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
add dword [ebp - 0x2c44], 8
push 2
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2c46]
push edi
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
movsx edi, word [ebp - 0x2c46]
and edi, 0xffff
push edi
call sub.wsock32.dll_ntohs
mov edi, eax
and edi, 0xffff
mov word [ebp - 0x2c46], di
add dword [ebp - 0x2c44], 2
cmp word [ebp - 0x2c4e], 0xf00
jne 0x4028e0
push 2
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2c64]
push edi
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
movsx edi, word [ebp - 0x2c64]
and edi, 0xffff
push edi
call sub.wsock32.dll_ntohs
mov edi, eax
and edi, 0xffff
mov word [ebp - 0x2c64], di
add dword [ebp - 0x2c44], 2
push 0xff
lea edi, [ebp - 0x2904]
push edi
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2804]
push edi
call fcn.00402af3
add esp, 0x10
mov edi, eax
add edi, dword [ebp - 0x2c44]
mov dword [ebp - 0x2c44], edi
mov di, word [ebp - 0x2c64]
cmp di, word [ebp - 0x2c56]
jle 0x4028f3
mov di, word [ebp - 0x2c64]
mov word [ebp - 0x2c56], di
push 0xff
lea edi, [ebp - 0x2904]
push edi
push dword [ebp + 0xc]
call sub.CRTDLL.DLL_strncpy
add esp, 0xc
jmp 0x4028f3
movsx edi, word [ebp - 0x2c46]
add edi, dword [ebp - 0x2c44]
mov dword [ebp - 0x2c44], edi
inc dword [ebp - 0x2c4c]
mov edi, dword [ebp - 0x2c54]
cmp dword [ebp - 0x2c4c], edi
jl 0x40279e
jmp 0x402923
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402942
mov eax, 1
jmp 0x402942
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
imul edi, dword [ebp + 0x14], 0x61c
mov dword [edi + 0x4088f8], 0
mov eax, 0
pop edi
pop esi
leave
ret