Function at 0x402670
Capabilities:
Create udp socket
Encode data using xor
Get socket status
Receive data
Receive data on socket
Resolve function by parsing pe exports
Send data
Send data on socket
Set socket configuration

Disassembly:
mov eax, 0x48b8
call fcn.0041e190
push ebx
mov ebx, ecx
push ebp
push esi
lea eax, [ebx + 0x1f8]
push edi
push eax
mov dword [esp + 0x38], ebx
call fcn.00414e90
mov edx, eax
mov edi, str.CfgLicense.dat
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.00404dc0
push 0xffff
lea esi, [ebx + 0x604]
push 0
push 0x1158
push str.LICENSEPORTTCP
mov ecx, esi
call fcn.0040b770
push 0xffff
push 0
push 0x1159
push str.LICENSEPORTUDP
mov ecx, esi
mov ebp, eax
call fcn.0040b770
mov edi, eax
xor ebx, ebx
mov dword [esp + 0x48], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp di, bp
mov dword [esp + 0x58], eax
jne 0x402730
cmp bp, 0xc350
mov eax, ebp
jae 0x402726
and eax, 0xffff
inc eax
jmp 0x40272c
and eax, 0xffff
dec eax
add dword [esp + 0x48], eax
lea eax, [esp + 0x38c8]
push 0x1000
push eax
push str.LICENSEADAPTER
mov ecx, esi
call fcn.0040ba30
mov al, byte [esp + 0x38c8]
test al, al
je 0x402775
lea ecx, [esp + 0x38c8]
push ecx
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
je 0x402775
lea edx, [esp + 0x38c8]
push edx
call sub.WSOCK32.dll_inet_addr
mov ebx, eax
xor eax, eax
mov ecx, 0x400
mov edi, 0x426fc4
push eax
push 1
push 2
rep stosd dword es:[edi], eax
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x50], esi
jne 0x4027a8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x48b8
ret
xor eax, eax
push ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
call sub.WSOCK32.dll_htons
lea ecx, [esp + 0x40]
mov word [esp + 0x26], ax
push ecx
push 0x8004667e
push esi
mov word [esp + 0x30], 2
mov dword [esp + 0x4c], 1
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x402802
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x48b8
ret
lea edx, [esp + 0x24]
push 0x10
push edx
push esi
call sub.WSOCK32.dll_bind
test eax, eax
je 0x402829
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x48b8
ret
push 5
push esi
call sub.WSOCK32.dll_listen
test eax, eax
je 0x40284b
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x48b8
ret
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x3c], edi
jne 0x402877
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0x48b8
ret
mov ecx, dword [esp + 0x48]
xor eax, eax
mov dword [esp + 0x24], eax
push ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
call sub.WSOCK32.dll_htons
lea edx, [esp + 0x40]
mov word [esp + 0x26], ax
push edx
push 0x8004667e
push edi
mov word [esp + 0x30], 2
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x4028d3
push edi
call sub.WSOCK32.dll_closesocket
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 6
pop ebx
add esp, 0x48b8
ret
lea eax, [esp + 0x24]
push 0x10
push eax
push edi
call sub.WSOCK32.dll_bind
test eax, eax
je 0x402900
push edi
call sub.WSOCK32.dll_closesocket
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x48b8
ret
lea ecx, [esp + 0x40]
push 4
push ecx
push 0x20
push 0xffff
push edi
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x402934
push edi
call sub.WSOCK32.dll_closesocket
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 8
pop ebx
add esp, 0x48b8
ret
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x44], ebp
jne 0x402966
push edi
call sub.WSOCK32.dll_closesocket
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 9
pop ebx
add esp, 0x48b8
ret
xor edx, edx
lea eax, [esp + 0x40]
mov dword [esp + 0x24], edx
push eax
mov dword [esp + 0x2c], edx
push 0x8004667e
mov dword [esp + 0x34], edx
push ebp
mov dword [esp + 0x3c], edx
mov dword [esp + 0x34], ebx
mov word [esp + 0x32], dx
mov word [esp + 0x30], 2
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x4029be
push ebp
call sub.WSOCK32.dll_closesocket
push edi
call sub.WSOCK32.dll_closesocket
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0xa
pop ebx
add esp, 0x48b8
ret
lea ecx, [esp + 0x24]
push 0x10
push ecx
push ebp
call sub.WSOCK32.dll_bind
test eax, eax
je 0x4029f1
push ebp
call sub.WSOCK32.dll_closesocket
push edi
call sub.WSOCK32.dll_closesocket
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0xb
pop ebx
add esp, 0x48b8
ret
lea edx, [esp + 0x40]
push 4
push edx
push 0x20
push 0xffff
push ebp
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x402a2b
push ebp
call sub.WSOCK32.dll_closesocket
push edi
call sub.WSOCK32.dll_closesocket
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 0xc
pop ebx
add esp, 0x48b8
ret
xor edi, edi
or ebp, 0xffffffff
cmp ebx, edi
mov dword [esp + 0x38], ebp
je 0x402ab5
push edi
push 2
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, ebp
mov dword [esp + 0x38], esi
je 0x402ab5
xor eax, eax
lea ecx, [esp + 0x40]
mov dword [esp + 0x24], eax
push ecx
mov dword [esp + 0x2c], eax
push 0x8004667e
mov dword [esp + 0x34], eax
push esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], edi
mov word [esp + 0x32], di
mov word [esp + 0x30], 2
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
jne 0x402aab
lea edx, [esp + 0x24]
push 0x10
push edx
push esi
call sub.WSOCK32.dll_bind
test eax, eax
jne 0x402aab
lea eax, [esp + 0x40]
push 4
push eax
push 0x20
push 0xffff
push esi
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x402ab5
push esi
call sub.WSOCK32.dll_closesocket
mov dword [esp + 0x38], ebp
mov dword [esp + 0x20], edi
mov dword [esp + 0x94], 1
mov dword [esp + 0x98], edi
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
mov dword [esp + 0x54], edi
mov eax, dword [0x42a7b8]
cmp eax, 1
jne 0x403d51
mov ebx, dword [esp + 0x54]
mov ecx, 0x1e
mov eax, ebx
cdq
idiv ecx
test edx, edx
jne 0x402b9c
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [esp + 0x34]
push 0
push 0
mov ecx, edi
call fcn.00403df0
mov eax, dword [esp + 0x48]
xor edx, edx
mov dword [esp + 0x24], edx
push eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
call sub.WSOCK32.dll_htons
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x58]
lea edx, [esp + 0x24]
push 0x10
mov word [esp + 0x2a], ax
push edx
push 0
lea eax, [esp + 0x98]
push 8
push eax
push esi
mov word [esp + 0x3c], 2
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0xa4], 0x4c494b
mov dword [esp + 0xa8], ecx
call sub.WSOCK32.dll_sendto
and ebx, reloc.WSOCK32.dll_accept
jns 0x402b83
dec ebx
or ebx, 0xfffffffe
inc ebx
jne 0x402ba0
push 0
push 0
push 0
mov ecx, edi
call fcn.00404f80
test al, al
jne 0x403c26
jmp 0x402ba0
mov esi, dword [esp + 0x44]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x50]
mov ebp, dword [esp + 0x3c]
mov eax, 3
mov ecx, eax
cmp edx, 0xffffffff
mov dword [esp + 0x2844], 0
mov dword [esp + 0x740], ebx
mov dword [esp + 0x17c4], ebx
mov dword [esp + 0x744], ebp
mov dword [esp + 0x17c8], ebp
mov dword [esp + 0x748], esi
mov dword [esp + 0x73c], eax
mov dword [esp + 0x17cc], esi
mov dword [esp + 0x17c0], ecx
je 0x402c1e
mov eax, 4
mov dword [esp + 0x74c], edx
mov ecx, eax
mov dword [esp + 0x73c], eax
mov dword [esp + 0x17d0], edx
mov dword [esp + 0x17c0], ecx
mov edx, dword [esp + 0x20]
xor edi, edi
test edx, edx
jle 0x402dbc
lea esi, [edx - 1]
lea edx, [edx*4 + 0x426fc4]
mov ebp, 0x3fffffff
mov dword [esp + 0x14], esi
mov esi, 0x426fc4
mov dword [esp + 0x4c], edx
mov dword [esp + 0x1c], 0x426fc8
mov dword [esp + 0x18], ebp
mov edx, dword [esi]
mov ebx, dword [edx + 8]
dec ebx
je 0x402d5b
dec ebx
je 0x402d06
dec ebx
jne 0x402d8b
mov ebx, dword [esp + 0x34]
push str.Close_socket
push 2
push ebx
call fcn.00401a90
mov eax, dword [esi]
add esp, 0xc
mov ecx, ebx
push 1
push eax
call fcn.00403df0
mov ecx, dword [esi]
push ecx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
cmp edi, eax
jge 0x402cbb
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
lea eax, [edx + ebp]
shl eax, 2
push eax
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
sub eax, 4
dec ebx
sub ecx, 4
dec edx
mov dword [esp + 0x4c], eax
mov dword [eax], 0
mov eax, dword [esp + 0x73c]
dec edi
sub ebp, 0x3fffffff
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x17c0]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], edx
sub esi, 4
jmp 0x402d8b
mov ebx, dword [edx]
mov ebp, dword [esp + 0x2844]
mov dword [esp + eax*4 + 0x740], ebx
mov eax, dword [esp + 0x73c]
inc eax
mov dword [esp + 0x73c], eax
mov ebx, dword [edx]
mov dword [esp + ebp*4 + 0x2848], ebx
mov ebx, dword [esp + 0x2844]
inc ebx
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x2844], ebx
mov edx, dword [edx]
mov dword [esp + ecx*4 + 0x17c4], edx
mov ecx, dword [esp + 0x17c0]
inc ecx
mov dword [esp + 0x17c0], ecx
jmp 0x402d8b
mov ebx, dword [edx]
mov dword [esp + eax*4 + 0x740], ebx
mov eax, dword [esp + 0x73c]
inc eax
mov dword [esp + 0x73c], eax
mov edx, dword [edx]
mov dword [esp + ecx*4 + 0x17c4], edx
mov ecx, dword [esp + 0x17c0]
inc ecx
mov dword [esp + 0x17c0], ecx
mov edx, dword [esp + 0x1c]
inc edi
add edx, 4
add ebp, 0x3fffffff
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x20]
add esi, 4
cmp edi, edx
mov dword [esp + 0x18], ebp
jl 0x402c54
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x44]
mov ebx, dword [esp + 0x50]
lea edx, [esp + 0x94]
neg ecx
push edx
lea edx, [esp + 0x17c4]
sbb ecx, ecx
and ecx, edx
lea edx, [esp + 0x2848]
push ecx
mov ecx, dword [esp + 0x284c]
neg ecx
sbb ecx, ecx
and ecx, edx
neg eax
push ecx
lea ecx, [esp + 0x748]
sbb eax, eax
and eax, ecx
push eax
push 0
call sub.WSOCK32.dll_select
mov edi, eax
test edi, edi
mov dword [esp + 0x14], edi
je 0x403c0c
mov edx, dword [esp + 0x34]
push str.Got_select
push 2
push edx
call fcn.00401a90
add esp, 0xc
cmp edi, 0xffffffff
je 0x403d4c
lea eax, [esp + 0x17c0]
push eax
push ebp
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x403d4c
lea ecx, [esp + 0x17c0]
push ecx
push ebx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x403d4c
lea edx, [esp + 0x17c0]
push edx
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x403d4c
lea eax, [esp + 0x73c]
push eax
push ebx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x402f65
push 0x16c
call sub.MFC42.DLL_operatornew
mov esi, eax
xor edi, edi
add esp, 4
cmp esi, edi
je 0x402efb
mov eax, dword [esp + 0x50]
lea ecx, [esp + 0x18]
lea edx, [esi + 0xc]
push ecx
push edx
push eax
mov dword [esp + 0x24], 0x10
call sub.WSOCK32.dll_accept
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x402efd
mov eax, 1
push edi
mov dword [esi + 8], eax
mov dword [esi + 4], eax
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], edi
mov dword [esi + 0x3c], edi
mov byte [esi + 0x40], 0
mov dword [esi + 0x164], edi
mov dword [esi + 0x168], edi
mov dword [esi + 0x60], edi
jmp 0x402efd
xor esi, esi
mov ecx, dword [esi + 0x10]
push ecx
call sub.WSOCK32.dll_inet_ntoa
mov ebx, dword [esp + 0x34]
push eax
push str.Got_accept__s
push 2
push ebx
call fcn.00401a90
add esp, 0x10
cmp esi, edi
je 0x402f3d
mov eax, dword [esp + 0x20]
cmp eax, 0x400
jge 0x402f3d
cmp dword [esi], 0xffffffff
je 0x402f3d
mov dword [eax*4 + 0x426fc4], esi
inc eax
mov dword [esp + 0x20], eax
jmp 0x402f56
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
push str.Error_6
push 2
push ebx
call fcn.00401a90
add esp, 0xc
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x3c]
dec eax
mov dword [esp + 0x14], eax
mov edi, eax
lea edx, [esp + 0x73c]
push edx
push ebp
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x403057
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push 0x4004667f
push ebp
call sub.WSOCK32.dll_ioctlsocket
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov dword [esp + 0x6c], ecx
cmp eax, 0x100
mov dword [esp + 0x70], ecx
mov dword [esp + 0x5c], 0x10
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], ecx
jae 0x402fd4
lea edx, [esp + 0x5c]
lea ecx, [esp + 0x6c]
push edx
push ecx
push 0
push eax
mov eax, dword [esp + 0x4c]
lea edx, [esp + 0x14c]
push edx
push eax
jmp 0x402ff2
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x6c]
push ecx
mov ecx, dword [esp + 0x40]
push edx
push 0
lea eax, [esp + 0x148]
push 0x100
push eax
push ecx
call sub.WSOCK32.dll_recvfrom
mov esi, eax
cmp esi, 4
jl 0x40302d
cmp dword [esp + 0x13c], 0xf00d4a11
jne 0x40302d
mov ecx, dword [esp + 0x3c]
lea edx, [esp + 0x6c]
push 0x10
push edx
push 0
lea eax, [esp + 0x58]
push 4
push eax
push ecx
mov dword [esp + 0x64], 0x214948
call sub.WSOCK32.dll_sendto
cmp esi, 8
jl 0x403052
cmp dword [esp + 0x13c], 0x4c494b
jne 0x403052
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x140]
cmp ecx, eax
jne 0x403c4c
dec edi
mov dword [esp + 0x14], edi
mov al, byte [esp + 0x12]
xor edi, edi
test al, al
mov esi, 3
jne 0x40324c
mov ebx, 0x4c494b
cmp edi, 2
jge 0x40324c
cmp edi, 1
jne 0x40308e
mov eax, dword [esp + 0x38]
cmp eax, 0xffffffff
je 0x40324c
mov esi, eax
jmp 0x40309c
test edi, edi
je 0x403098
mov esi, dword [esp + 0x38]
jmp 0x40309c
mov esi, dword [esp + 0x44]
lea edx, [esp + 0x73c]
push edx
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x403147
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push 0x4004667f
push esi
call sub.WSOCK32.dll_ioctlsocket
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov dword [esp + 0x7c], ecx
cmp eax, 0x100
mov dword [esp + 0x80], ecx
mov dword [esp + 0x60], 0x10
mov dword [esp + 0x84], ecx
mov dword [esp + 0x88], ecx
jae 0x403107
lea edx, [esp + 0x60]
lea ecx, [esp + 0x7c]
push edx
push ecx
push 0
push eax
jmp 0x403118
lea eax, [esp + 0x60]
lea ecx, [esp + 0x7c]
push eax
push ecx
push 0
push 0x100
lea edx, [esp + 0x24c]
push edx
push esi
call sub.WSOCK32.dll_recvfrom
cmp eax, 8
jl 0x403143
cmp dword [esp + 0x23c], ebx
jne 0x403143
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x240]
cmp ecx, eax
jne 0x403152
dec dword [esp + 0x14]
inc edi
mov esi, 3
jmp 0x40306f
mov dword [esp + 0x68], eax
lea eax, [esp + 0x7c]
push 0x10
push eax
push 0
lea ecx, [esp + 0x70]
push 8
push ecx
push esi
mov dword [esp + 0x7c], 0x4c494b
call sub.WSOCK32.dll_sendto
mov dl, byte [0x42a800]
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x33d]
mov byte [esp + 0x33c], dl
push 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x84]
push 0
push 0x20
push eax
mov byte [esp + 0x22], 1
mov byte [esp + 0x23], 0
call sub.WSOCK32.dll_inet_ntoa
lea ecx, [esp + 0xa8]
push eax
push ecx
call fcn.00411fe0
add esp, 0xc
lea edx, [esp + 0x344]
push eax
push edx
call fcn.00414aa0
lea eax, [esp + 0xac]
lea ecx, [esp + 0x34c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 0x18
test eax, eax
je 0x40321b
mov ecx, dword [0x42b01c]
lea edx, [esp + 0x9c]
push edx
lea eax, [esp + 0x340]
mov edx, dword [ecx + 0xa938]
push eax
mov eax, dword [esp + 0x3c]
push edx
push 1
push eax
call fcn.00401a90
add esp, 0x14
jmp 0x40323f
mov edx, dword [0x42b01c]
lea ecx, [esp + 0x9c]
push ecx
mov ecx, dword [esp + 0x38]
mov eax, dword [edx + 0xa934]
push eax
push 1
push ecx
call fcn.00401a90
add esp, 0x10
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 3
mov eax, dword [esp + 0x20]
xor ebx, ebx
test eax, eax
mov dword [esp + 0x1c], ebx
jle 0x403c0c
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x403c0c
mov ecx, dword [ebx*4 + 0x426fc4]
mov eax, dword [ecx + 8]
dec eax
je 0x4037d8
dec eax
jne 0x403bfb
mov eax, dword [ecx]
lea edx, [esp + 0x73c]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x403647
mov ebp, dword [ebx*4 + 0x426fc4]
lea ecx, [esp + 0x18]
push ecx
xor edi, edi
mov edx, dword [ebp]
push 0x4004667f
push edx
mov dword [esp + 0x24], edi
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x4032c5
push str.ioctl_error
jmp 0x403327
mov edx, dword [esp + 0x18]
cmp edx, 1
jae 0x4032e5
push edx
push str.Read_ioctl_returned__d
push 2
push 0x426488
call fcn.00401a90
add esp, 0x10
jmp 0x403336
mov ecx, dword [ebp + 0x164]
mov eax, 0x100
sub eax, ecx
push edi
cmp edx, eax
jge 0x403303
lea eax, [ecx + ebp + 0x64]
mov ecx, dword [ebp]
push edx
push eax
push ecx
jmp 0x40330d
push eax
mov eax, dword [ebp]
lea edx, [ecx + ebp + 0x64]
push edx
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
jne 0x40331e
push str.Recv_returned_error
jmp 0x403327
cmp eax, edi
jne 0x403353
push str.Read_recv_returned_0
push 2
push 0x426488
call fcn.00401a90
add esp, 0xc
mov eax, dword [ebp]
cmp eax, 0xffffffff
je 0x403344
push eax
call sub.WSOCK32.dll_closesocket
mov dword [ebp], 0xffffffff
mov dword [ebp + 8], esi
jmp 0x403639
mov ecx, dword [ebp + 0x164]
add ecx, eax
mov eax, dword [ebp + 4]
dec eax
mov dword [ebp + 0x164], ecx
je 0x4033ae
dec eax
jne 0x403639
cmp ecx, 4
jb 0x403639
mov eax, dword [ebp + 0x64]
mov dword [ebp + 0x164], edi
cmp eax, 0xfeedf00d
jne 0x403399
push edi
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [ebp + 0x1c], eax
jmp 0x403639
cmp eax, 0xdeadbeef
jne 0x403639
push str.Close_received
jmp 0x403327
cmp ecx, 0x40
jb 0x403639
mov ebx, dword [sym.imp.MSVCRT.dll_time]
push 0
mov dword [ebp + 0x164], 0
call ebx
lea esi, [ebp + 0x64]
mov ecx, 0x10
lea edi, [esp + 0xc0]
add esp, 4
rep movsd dword es:[edi], dword [esi]
mov ax, word [esp + 0xbe]
cmp ax, 0xc354
jne 0x403424
cmp word [esp + 0xbc], 0x40
jne 0x40342f
lea eax, [ebp + 0x40]
mov ecx, 8
lea esi, [esp + 0xdc]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
xor edx, edx
xor ecx, ecx
cmp byte [eax + ecx], 0
je 0x4034c1
inc ecx
cmp ecx, 0x20
jb 0x40340f
jmp 0x4034c6
cmp word [esp + 0xbc], 0x40
je 0x403433
xor eax, eax
jmp 0x403474
cmp ax, 0xc354
jae 0x403440
mov eax, 1
jmp 0x403474
jbe 0x403449
mov eax, 2
jmp 0x403474
push 0
call ebx
push 0
call ebx
mov ecx, dword [esp + 0xe0]
add esp, 8
sub ecx, eax
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
xor edx, edx
cmp eax, 0x93a80
setle dl
dec edx
and edx, 3
mov eax, edx
dec eax
je 0x4034b0
dec eax
je 0x40349f
dec eax
je 0x40348e
mov eax, 0x525245
mov dword [ebp + 4], 4
jmp 0x4035a0
mov eax, 0x335245
mov dword [ebp + 4], 4
jmp 0x4035a0
mov eax, 0x325245
mov dword [ebp + 4], 4
jmp 0x4035a0
mov eax, 0x315245
mov dword [ebp + 4], 4
jmp 0x4035a0
cmp ecx, 0x20
jb 0x4034ca
mov byte [ebp + 0x5f], 0
mov dword [ebp + 0x60], edx
mov ecx, 8
mov esi, dword [eax]
mov ebx, dword [ebp + 0x60]
xor ebx, esi
add eax, 4
dec ecx
mov dword [ebp + 0x60], ebx
jne 0x4034d2
mov ebx, dword [esp + 0xc0]
mov edi, dword [esp + 0xc4]
xor eax, eax
cmp ebx, edx
mov esi, dword [esp + 0xc8]
mov ebx, dword [esp + 0xcc]
setne al
xor ecx, ecx
cmp edi, edx
setne cl
mov dword [ebp + 0x24], ecx
xor ecx, ecx
cmp esi, edx
mov edi, dword [esp + 0xd0]
setne cl
mov dword [ebp + 0x28], ecx
xor ecx, ecx
cmp ebx, edx
mov bl, byte [esp + 0xd7]
setne cl
mov dword [ebp + 0x2c], ecx
xor ecx, ecx
cmp edi, edx
mov dword [ebp + 0x20], eax
setne cl
mov dword [ebp + 0x30], ecx
xor ecx, ecx
cmp word [esp + 0xd4], dx
setne cl
mov dword [ebp + 0x34], ecx
xor ecx, ecx
test bl, bl
setne cl
cmp eax, edx
mov dword [ebp + 0x38], ecx
je 0x403576
cmp dword [0x42a7c0], edx
jne 0x403576
cmp dword [0x42a7d0], edx
je 0x403576
mov dword [ebp + 0x20], edx
mov dword [ebp + 0x30], 1
push edx
push ebp
mov ecx, 0x426488
call fcn.00403df0
test al, al
je 0x403594
mov eax, 0x4b4341
mov dword [ebp + 4], 2
jmp 0x4035a0
mov eax, 0x52454a
mov dword [ebp + 4], 3
mov dword [0x428158], eax
sub eax, 0x4b4341
neg eax
sbb eax, eax
mov edx, dword [ebp]
and eax, 0xfffff800
push 0
add eax, 0x804
mov esi, eax
push esi
push 0x428158
push edx
call sub.WSOCK32.dll_send
cmp eax, esi
je 0x403635
cmp eax, 0xffffffff
jne 0x403612
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x403635
push str.Error_1
push 2
push 0x426488
call fcn.00401a90
mov eax, dword [ebp]
add esp, 0xc
cmp eax, 0xffffffff
je 0x403602
push eax
call sub.WSOCK32.dll_closesocket
mov dword [ebp], 0xffffffff
mov dword [ebp + 8], 3
jmp 0x403635
jle 0x403635
push str.Error_2
push 2
push 0x426488
mov dword [ebp + 0x168], eax
mov dword [ebp + 8], 2
call fcn.00401a90
add esp, 0xc
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov esi, 3
dec eax
mov dword [esp + 0x14], eax
mov ecx, dword [ebx*4 + 0x426fc4]
lea eax, [esp + 0x2844]
push eax
mov edx, dword [ecx]
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x40378e
mov esi, dword [ebx*4 + 0x426fc4]
push str.Error_3
push 2
push 0x426488
call fcn.00401a90
mov ecx, dword [esi + 4]
add esp, 0xc
cmp ecx, 2
mov eax, 0x525245
jne 0x403695
mov eax, 0x4b4341
jmp 0x40369f
cmp ecx, 0x52454a
jne 0x40369f
mov eax, ecx
mov dword [0x428158], eax
mov ecx, dword [esi + 0x168]
sub eax, 0x4b4341
neg eax
sbb eax, eax
and eax, 0xfffff800
add eax, 0x804
sub eax, ecx
mov edi, eax
cmp edi, 1
jge 0x4036f9
push str.Error_4
push 2
push 0x426488
call fcn.00401a90
mov eax, dword [esi]
add esp, 0xc
cmp eax, 0xffffffff
je 0x4036e7
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esi], 0xffffffff
mov dword [esi + 8], 3
jmp 0x403780
push 0
lea eax, [ecx + 0x428158]
mov ecx, dword [esi]
push edi
push eax
push ecx
call sub.WSOCK32.dll_send
cmp eax, edi
je 0x403780
cmp eax, 0xffffffff
jne 0x403750
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x403780
push str.Error_5
push 2
push 0x426488
call fcn.00401a90
mov eax, dword [esi]
add esp, 0xc
cmp eax, 0xffffffff
je 0x4036e7
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esi], 0xffffffff
mov dword [esi + 8], 3
jmp 0x403780
jle 0x403780
mov ecx, dword [esi + 0x168]
sub ecx, eax
mov eax, ecx
mov dword [esi + 0x168], ecx
test eax, eax
jle 0x40376f
mov dword [esi + 8], 2
jmp 0x403780
mov dword [esi + 0x168], 0
mov dword [esi + 8], 1
mov eax, dword [esp + 0x14]
mov esi, 3
dec eax
mov dword [esp + 0x14], eax
mov eax, dword [ebx*4 + 0x426fc4]
lea edx, [esp + 0x17c0]
push edx
mov ecx, dword [eax]
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x403bfb
push str.Read_write_error
push 2
push 0x426488
call fcn.00401a90
mov esi, dword [ebx*4 + 0x426fc4]
add esp, 0xc
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x403be0
jmp 0x403bda
mov eax, dword [ecx]
lea edx, [esp + 0x73c]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x403b9d
mov ebp, dword [ebx*4 + 0x426fc4]
lea ecx, [esp + 0x18]
push ecx
xor edi, edi
mov edx, dword [ebp]
push 0x4004667f
push edx
mov dword [esp + 0x24], edi
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x40381b
push str.ioctl_error
jmp 0x40387d
mov edx, dword [esp + 0x18]
cmp edx, 1
jae 0x40383b
push edx
push str.Read_ioctl_returned__d
push 2
push 0x426488
call fcn.00401a90
add esp, 0x10
jmp 0x40388c
mov ecx, dword [ebp + 0x164]
mov eax, 0x100
sub eax, ecx
push edi
cmp edx, eax
jge 0x403859
lea eax, [ecx + ebp + 0x64]
mov ecx, dword [ebp]
push edx
push eax
push ecx
jmp 0x403863
push eax
mov eax, dword [ebp]
lea edx, [ecx + ebp + 0x64]
push edx
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
jne 0x403874
push str.Recv_returned_error
jmp 0x40387d
cmp eax, edi
jne 0x4038a9
push str.Read_recv_returned_0
push 2
push 0x426488
call fcn.00401a90
add esp, 0xc
mov eax, dword [ebp]
cmp eax, 0xffffffff
je 0x40389a
push eax
call sub.WSOCK32.dll_closesocket
mov dword [ebp], 0xffffffff
mov dword [ebp + 8], esi
jmp 0x403b8f
mov ecx, dword [ebp + 0x164]
add ecx, eax
mov eax, dword [ebp + 4]
dec eax
mov dword [ebp + 0x164], ecx
je 0x403904
dec eax
jne 0x403b8f
cmp ecx, 4
jb 0x403b8f
mov eax, dword [ebp + 0x64]
mov dword [ebp + 0x164], edi
cmp eax, 0xfeedf00d
jne 0x4038ef
push edi
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [ebp + 0x1c], eax
jmp 0x403b8f
cmp eax, 0xdeadbeef
jne 0x403b8f
push str.Close_received
jmp 0x40387d
cmp ecx, 0x40
jb 0x403b8f
mov ebx, dword [sym.imp.MSVCRT.dll_time]
push 0
mov dword [ebp + 0x164], 0
call ebx
lea esi, [ebp + 0x64]
mov ecx, 0x10
lea edi, [esp + 0x100]
add esp, 4
rep movsd dword es:[edi], dword [esi]
mov ax, word [esp + 0xfe]
cmp ax, 0xc354
jne 0x40397a
cmp word [esp + 0xfc], 0x40
jne 0x403985
lea eax, [ebp + 0x40]
mov ecx, 8
lea esi, [esp + 0x11c]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
xor edx, edx
xor ecx, ecx
cmp byte [eax + ecx], 0
je 0x403a17
inc ecx
cmp ecx, 0x20
jb 0x403965
jmp 0x403a1c
cmp word [esp + 0xfc], 0x40
je 0x403989
xor eax, eax
jmp 0x4039ca
cmp ax, 0xc354
jae 0x403996
mov eax, 1
jmp 0x4039ca
jbe 0x40399f
mov eax, 2
jmp 0x4039ca
push 0
call ebx
push 0
call ebx
mov ecx, dword [esp + 0x120]
add esp, 8
sub ecx, eax
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
xor edx, edx
cmp eax, 0x93a80
setle dl
dec edx
and edx, 3
mov eax, edx
dec eax
je 0x403a06
dec eax
je 0x4039f5
dec eax
je 0x4039e4
mov eax, 0x525245
mov dword [ebp + 4], 4
jmp 0x403af6
mov eax, 0x335245
mov dword [ebp + 4], 4
jmp 0x403af6
mov eax, 0x325245
mov dword [ebp + 4], 4
jmp 0x403af6
mov eax, 0x315245
mov dword [ebp + 4], 4
jmp 0x403af6
cmp ecx, 0x20
jb 0x403a20
mov byte [ebp + 0x5f], 0
mov dword [ebp + 0x60], edx
mov ecx, 8
mov esi, dword [eax]
mov ebx, dword [ebp + 0x60]
xor ebx, esi
add eax, 4
dec ecx
mov dword [ebp + 0x60], ebx
jne 0x403a28
mov ebx, dword [esp + 0x100]
mov edi, dword [esp + 0x104]
xor eax, eax
cmp ebx, edx
mov esi, dword [esp + 0x108]
mov ebx, dword [esp + 0x10c]
setne al
xor ecx, ecx
cmp edi, edx
setne cl
mov dword [ebp + 0x24], ecx
xor ecx, ecx
cmp esi, edx
mov edi, dword [esp + 0x110]
setne cl
mov dword [ebp + 0x28], ecx
xor ecx, ecx
cmp ebx, edx
mov bl, byte [esp + 0x117]
setne cl
mov dword [ebp + 0x2c], ecx
xor ecx, ecx
cmp edi, edx
mov dword [ebp + 0x20], eax
setne cl
mov dword [ebp + 0x30], ecx
xor ecx, ecx
cmp word [esp + 0x114], dx
setne cl
mov dword [ebp + 0x34], ecx
xor ecx, ecx
test bl, bl
setne cl
cmp eax, edx
mov dword [ebp + 0x38], ecx
je 0x403acc
cmp dword [0x42a7c0], edx
jne 0x403acc
cmp dword [0x42a7d0], edx
je 0x403acc
mov dword [ebp + 0x20], edx
mov dword [ebp + 0x30], 1
push edx
push ebp
mov ecx, 0x426488
call fcn.00403df0
test al, al
je 0x403aea
mov eax, 0x4b4341
mov dword [ebp + 4], 2
jmp 0x403af6
mov eax, 0x52454a
mov dword [ebp + 4], 3
mov dword [0x428158], eax
sub eax, 0x4b4341
neg eax
sbb eax, eax
mov edx, dword [ebp]
and eax, 0xfffff800
push 0
add eax, 0x804
mov esi, eax
push esi
push 0x428158
push edx
call sub.WSOCK32.dll_send
cmp eax, esi
je 0x403b8b
cmp eax, 0xffffffff
jne 0x403b68
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x403b8b
push str.Error_1
push 2
push 0x426488
call fcn.00401a90
mov eax, dword [ebp]
add esp, 0xc
cmp eax, 0xffffffff
je 0x403b58
push eax
call sub.WSOCK32.dll_closesocket
mov dword [ebp], 0xffffffff
mov dword [ebp + 8], 3
jmp 0x403b8b
jle 0x403b8b
push str.Error_2
push 2
push 0x426488
mov dword [ebp + 0x168], eax
mov dword [ebp + 8], 2
call fcn.00401a90
add esp, 0xc
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov esi, 3
dec eax
mov dword [esp + 0x14], eax
mov ecx, dword [ebx*4 + 0x426fc4]
lea eax, [esp + 0x17c0]
push eax
mov edx, dword [ecx]
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x403bfb
push str.Connect_error
push 2
push 0x426488
call fcn.00401a90
mov esi, dword [ebx*4 + 0x426fc4]
add esp, 0xc
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x403be0
push eax
call sub.WSOCK32.dll_closesocket
mov eax, dword [esp + 0x14]
mov dword [esi], 0xffffffff
dec eax
mov dword [esi + 8], 3
mov dword [esp + 0x14], eax
mov esi, 3
mov eax, dword [esp + 0x20]
inc ebx
cmp ebx, eax
mov dword [esp + 0x1c], ebx
jl 0x40325e
mov ecx, dword [esp + 0x54]
mov al, byte [esp + 0x12]
inc ecx
test al, al
mov dword [esp + 0x54], ecx
je 0x402ad9
jmp 0x403d51
mov eax, dword [0x42b01c]
mov ecx, dword [eax + 0xa950]
push ecx
push 1
push edi
call fcn.00401a90
add esp, 0xc
mov byte [esp + 0x12], 1
mov byte [esp + 0x13], 0
jmp 0x403d51
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x6c]
push 0x10
mov dword [esp + 0x6c], eax
push edx
push 0
lea eax, [esp + 0x70]
push 8
push eax
push ecx
mov dword [esp + 0x7c], 0x4c494b
call sub.WSOCK32.dll_sendto
mov dl, byte [0x42a800]
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x33d]
mov byte [esp + 0x33c], dl
push 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x74]
push 0
push 0x20
push eax
mov byte [esp + 0x22], 1
mov byte [esp + 0x23], 0
call sub.WSOCK32.dll_inet_ntoa
lea ecx, [esp + 0xa8]
push eax
push ecx
call fcn.00411fe0
add esp, 0xc
lea edx, [esp + 0x344]
push eax
push edx
call fcn.00414aa0
lea eax, [esp + 0xac]
lea ecx, [esp + 0x34c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 0x18
test eax, eax
je 0x403d1e
mov ecx, dword [0x42b01c]
lea edx, [esp + 0x9c]
push edx
lea eax, [esp + 0x340]
mov edx, dword [ecx + 0xa938]
push eax
mov eax, dword [esp + 0x3c]
push edx
push 1
push eax
call fcn.00401a90
add esp, 0x14
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x403d51
mov edx, dword [0x42b01c]
lea ecx, [esp + 0x9c]
push ecx
mov ecx, dword [esp + 0x38]
mov eax, dword [edx + 0xa934]
push eax
push 1
push ecx
call fcn.00401a90
add esp, 0x10
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x403d51
mov byte [esp + 0x13], 1
mov esi, 0x426fc4
mov ebx, 3
mov edi, dword [esi]
test edi, edi
je 0x403d93
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x403d6e
push eax
call sub.WSOCK32.dll_closesocket
mov dword [edi], 0xffffffff
mov dword [edi + 8], ebx
mov edx, dword [esi]
push edx
call sub.MFC42.DLL_operatordelete
mov dword [esi], 0
add esi, 4
add esp, 4
cmp esi, 0x427fc4
jl 0x403d5b
mov eax, dword [esp + 0x44]
push eax
call sub.WSOCK32.dll_closesocket
mov ecx, dword [esp + 0x3c]
push ecx
call sub.WSOCK32.dll_closesocket
mov edx, dword [esp + 0x50]
push edx
call sub.WSOCK32.dll_closesocket
mov eax, dword [esp + 0x38]
cmp eax, 0xffffffff
je 0x403dc0
push eax
call sub.WSOCK32.dll_closesocket
mov al, byte [esp + 0x12]
test al, al
jne 0x403de0
mov al, byte [esp + 0x13]
test al, al
je 0x403de0
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x48b8
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x48b8
ret