Function at 0x402f9d
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3d0
and dword [ebp - 0xc], 0
mov dword [ebp - 8], 1
and dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.0040a387
pop ecx
call fcn.0040a391
xor edx, edx
push 0xf
pop ecx
div ecx
mov dword [ebp - 4], edx
push 1
pop eax
test eax, eax
je 0x403b44
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x258], 0xffffffff
jne 0x40300a
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x230], eax
mov word [ebp - 0x234], 2
push 0x170c
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x232], ax
push 0x10
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0xffffffff
jne 0x40306b
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
push 0xc
lea eax, [ebp - 0x24c]
push eax
push dword [ebp - 0x258]
call fcn.00402e42
add esp, 0xc
test eax, eax
jne 0x403099
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
and byte [ebp - 0x240], 0
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x250]
push eax
push 0x414378
lea eax, [ebp - 0x24c]
push eax
call fcn.0040a86c
add esp, 0x10
cmp eax, 2
je 0x4030da
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
cmp dword [ebp - 0x250], 3
jne 0x4030ff
cmp dword [ebp - 0x23c], 3
jge 0x4030ff
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
cmp dword [ebp - 0x250], 3
jne 0x403131
cmp dword [ebp - 0x23c], 8
jne 0x403131
cmp dword [ebp - 8], 0
je 0x403131
push 8
push 3
push 0x414388
lea eax, [ebp - 0x24c]
push eax
call fcn.00409c85
add esp, 0x10
jmp 0x40314d
push 5
push 3
push str.RFB__03d._03d_n
lea eax, [ebp - 0x24c]
push eax
call fcn.00409c85
add esp, 0x10
and dword [ebp - 8], 0
push 0xc
lea eax, [ebp - 0x24c]
push eax
push dword [ebp - 0x258]
call fcn.00402e92
add esp, 0xc
test eax, eax
jne 0x40317b
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
cmp dword [ebp - 8], 0
je 0x403491
and dword [ebp - 8], 0
mov ax, word [0x4143a8]
mov word [ebp - 0x25c], ax
push 2
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0x258]
call fcn.00402e42
add esp, 0xc
test eax, eax
jne 0x4031c4
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
push 1
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x258]
call fcn.00402e92
add esp, 0xc
test eax, eax
jne 0x4031f2
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
push 4
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x258]
call fcn.00402e42
add esp, 0xc
test eax, eax
je 0x403475
mov eax, dword [ebp - 0x254]
and eax, 0xff000000
shr eax, 0x18
mov ecx, dword [ebp - 0x254]
and ecx, 0xff0000
shr ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x254]
and ecx, 0xff00
shl ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x254]
and ecx, 0xff
shl ecx, 0x18
or eax, ecx
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x3c8], eax
cmp dword [ebp - 0x3c8], 0
je 0x403272
jmp 0x403467
push 1
push 0x41655c
push dword [ebp - 0x258]
call fcn.00402e92
add esp, 0xc
test eax, eax
je 0x403453
push 0x18
lea eax, [ebp - 0x274]
push eax
push dword [ebp - 0x258]
call fcn.00402e42
add esp, 0xc
test eax, eax
je 0x403453
movzx eax, word [ebp - 0x274]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x274]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x274], ax
movzx eax, word [ebp - 0x272]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x272]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x272], ax
movzx eax, word [ebp - 0x26c]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x26c]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x26c], ax
movzx eax, word [ebp - 0x26a]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x26a]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x26a], ax
movzx eax, word [ebp - 0x268]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x268]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x268], ax
mov eax, dword [ebp - 0x260]
and eax, 0xff000000
shr eax, 0x18
mov ecx, dword [ebp - 0x260]
and ecx, 0xff0000
shr ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x260]
and ecx, 0xff00
shl ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x260]
and ecx, 0xff
shl ecx, 0x18
or eax, ecx
mov dword [ebp - 0x260], eax
mov eax, dword [ebp - 0x260]
inc eax
inc eax
push eax
call fcn.00409f86
pop ecx
mov dword [ebp - 0x3bc], eax
mov eax, dword [ebp - 0x3bc]
mov dword [ebp - 0x278], eax
push dword [ebp - 0x260]
push dword [ebp - 0x278]
push dword [ebp - 0x258]
call fcn.00403b48
add esp, 0xc
push dword [ebp + 0xc]
push dword [ebp - 0x278]
push dword [ebp - 0x23c]
push dword [ebp - 0x250]
push 0x4143ac
push 0x200
lea eax, [ebp - 0x210]
push eax
call fcn.0040a3af
add esp, 0x1c
lea eax, [ebp - 0x210]
push eax
push 0x41509c
push dword [ebp + 8]
call fcn.004074f2
add esp, 0xc
push 0x200
push 0
lea eax, [ebp - 0x210]
push eax
call fcn.00409ce0
add esp, 0xc
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
push 1
pop eax
jmp 0x403b46
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x403481
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x403b0d
push 4
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0x258]
call fcn.00402e42
add esp, 0xc
test eax, eax
jne 0x4034bf
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
mov eax, dword [ebp - 0x224]
and eax, 0xff000000
shr eax, 0x18
mov ecx, dword [ebp - 0x224]
and ecx, 0xff0000
shr ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x224]
and ecx, 0xff00
shl ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x224]
and ecx, 0xff
shl ecx, 0x18
or eax, ecx
mov dword [ebp - 0x224], eax
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x3cc], eax
cmp dword [ebp - 0x3cc], 0
je 0x403536
cmp dword [ebp - 0x3cc], 1
je 0x403566
cmp dword [ebp - 0x3cc], 2
je 0x40375b
jmp 0x403afd
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 2
jne 0x403556
xor eax, eax
jmp 0x403b46
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x403b0d
push 1
push 0x416560
push dword [ebp - 0x258]
call fcn.00402e92
add esp, 0xc
test eax, eax
je 0x403747
push 0x18
lea eax, [ebp - 0x290]
push eax
push dword [ebp - 0x258]
call fcn.00402e42
add esp, 0xc
test eax, eax
je 0x403747
movzx eax, word [ebp - 0x290]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x290]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x290], ax
movzx eax, word [ebp - 0x28e]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x28e]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x28e], ax
movzx eax, word [ebp - 0x288]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x288]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x288], ax
movzx eax, word [ebp - 0x286]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x286]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x286], ax
movzx eax, word [ebp - 0x284]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x284]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x284], ax
mov eax, dword [ebp - 0x27c]
and eax, 0xff000000
shr eax, 0x18
mov ecx, dword [ebp - 0x27c]
and ecx, 0xff0000
shr ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x27c]
and ecx, 0xff00
shl ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x27c]
and ecx, 0xff
shl ecx, 0x18
or eax, ecx
mov dword [ebp - 0x27c], eax
mov eax, dword [ebp - 0x27c]
inc eax
inc eax
push eax
call fcn.00409f86
pop ecx
mov dword [ebp - 0x3c0], eax
mov eax, dword [ebp - 0x3c0]
mov dword [ebp - 0x294], eax
push dword [ebp - 0x27c]
push dword [ebp - 0x294]
push dword [ebp - 0x258]
call fcn.00403b48
add esp, 0xc
push dword [ebp + 0xc]
push dword [ebp - 0x294]
push dword [ebp - 0x23c]
push dword [ebp - 0x250]
push 0x4143d8
push 0x200
lea eax, [ebp - 0x210]
push eax
call fcn.0040a3af
add esp, 0x1c
lea eax, [ebp - 0x210]
push eax
push 0x41509c
push dword [ebp + 8]
call fcn.004074f2
add esp, 0xc
push 0x200
push 0
lea eax, [ebp - 0x210]
push eax
call fcn.00409ce0
add esp, 0xc
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
push 1
pop eax
jmp 0x403b46
push 0x10
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x258]
call fcn.00402e42
add esp, 0xc
test eax, eax
jne 0x403789
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xf
jne 0x40379a
and dword [ebp - 4], 0
push 0xff
mov eax, dword [ebp - 4]
push dword [eax*4 + 0x4142c0]
lea eax, [ebp - 0x394]
push eax
call fcn.0040a8a0
add esp, 0xc
lea eax, [ebp - 0x394]
push eax
call fcn.00409f00
pop ecx
and byte [ebp + eax - 0x394], 0
lea eax, [ebp - 0x394]
push eax
lea eax, [ebp - 0x39c]
push eax
call fcn.00402de3
pop ecx
pop ecx
lea eax, [ebp - 0x394]
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00402d66
pop ecx
pop ecx
push 0x10
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x258]
call fcn.00402e92
add esp, 0xc
test eax, eax
jne 0x403825
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
push 4
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x258]
call fcn.00402e42
add esp, 0xc
test eax, eax
jne 0x403853
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
mov eax, dword [ebp - 0x254]
and eax, 0xff000000
shr eax, 0x18
mov ecx, dword [ebp - 0x254]
and ecx, 0xff0000
shr ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x254]
and ecx, 0xff00
shl ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x254]
and ecx, 0xff
shl ecx, 0x18
or eax, ecx
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x3d0], eax
cmp dword [ebp - 0x3d0], 0
je 0x4038c1
cmp dword [ebp - 0x3d0], 1
je 0x403abd
jmp 0x403aeb
push 1
push 0x416564
push dword [ebp - 0x258]
call fcn.00402e92
add esp, 0xc
test eax, eax
je 0x403aa9
push 0x18
lea eax, [ebp - 0x3b4]
push eax
push dword [ebp - 0x258]
call fcn.00402e42
add esp, 0xc
test eax, eax
je 0x403aa9
movzx eax, word [ebp - 0x3b4]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x3b4]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x3b4], ax
movzx eax, word [ebp - 0x3b2]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x3b2]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x3b2], ax
movzx eax, word [ebp - 0x3ac]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x3ac]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x3ac], ax
movzx eax, word [ebp - 0x3aa]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x3aa]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x3aa], ax
movzx eax, word [ebp - 0x3a8]
and eax, 0xff
shl eax, 8
movzx ecx, word [ebp - 0x3a8]
sar ecx, 8
and ecx, 0xff
or eax, ecx
mov word [ebp - 0x3a8], ax
mov eax, dword [ebp - 0x3a0]
and eax, 0xff000000
shr eax, 0x18
mov ecx, dword [ebp - 0x3a0]
and ecx, 0xff0000
shr ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x3a0]
and ecx, 0xff00
shl ecx, 8
or eax, ecx
mov ecx, dword [ebp - 0x3a0]
and ecx, 0xff
shl ecx, 0x18
or eax, ecx
mov dword [ebp - 0x3a0], eax
mov eax, dword [ebp - 0x3a0]
inc eax
inc eax
push eax
call fcn.00409f86
pop ecx
mov dword [ebp - 0x3c4], eax
mov eax, dword [ebp - 0x3c4]
mov dword [ebp - 0x3b8], eax
push dword [ebp - 0x3a0]
push dword [ebp - 0x3b8]
push dword [ebp - 0x258]
call fcn.00403b48
add esp, 0xc
lea eax, [ebp - 0x394]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x3b8]
push dword [ebp - 0x23c]
push dword [ebp - 0x250]
push 0x414400
push 0x200
lea eax, [ebp - 0x210]
push eax
call fcn.0040a3af
add esp, 0x20
lea eax, [ebp - 0x210]
push eax
push 0x41509c
push dword [ebp + 8]
call fcn.004074f2
add esp, 0xc
push 0x200
push 0
lea eax, [ebp - 0x210]
push eax
call fcn.00409ce0
add esp, 0xc
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
push 1
pop eax
jmp 0x403b46
and dword [ebp - 0xc], 0
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xf
jne 0x403ade
xor eax, eax
jmp 0x403b46
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x403afb
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
jmp 0x403b0d
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x403b46
cmp dword [ebp - 0x258], 0xffffffff
je 0x403b37
push 2
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [ebp - 0x258]
call dword [sym.imp.WS2_32.dll_closesocket]
or dword [ebp - 0x258], 0xffffffff
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402fd1
xor eax, eax
leave
ret