Function at 0x407265
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x4243b0]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 8]
mov eax, dword [eax + 0x54]
xor ecx, ecx
push edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x40], ecx
cmp eax, ecx
jne 0x4072b2
xor eax, eax
cmp dword [esi + 0x30], 6
setne al
dec eax
and eax, 0x3000
add eax, 0x1000
cmp dword [esi + 0x30], 6
mov edi, eax
jne 0x4072bf
lea eax, [edi - 1]
jmp 0x4072c4
mov eax, edi
shr eax, 4
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0x34]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x38]
mov dword [esp + 0x28], eax
cmp dword [esi + 0x68], ecx
jne 0x407306
lea ebx, [esi + 0xa0]
cmp dword [ebx], ecx
jne 0x407306
push edi
call fcn.0040bfd4
pop ecx
mov dword [ebx], eax
test eax, eax
je 0x4072fc
mov dword [esi + 0xb8], edi
test edi, edi
jne 0x407304
push 0x15
pop eax
jmp 0x407b70
xor ecx, ecx
cmp dword [esi + 0x6c], ecx
jne 0x40732e
lea ebx, [esi + 0x9c]
cmp dword [ebx], ecx
jne 0x40732e
push edi
call fcn.0040bfd4
pop ecx
mov dword [ebx], eax
test eax, eax
je 0x4072fc
mov dword [esi + 0xb4], edi
test edi, edi
je 0x4072fc
xor ecx, ecx
cmp dword [esi + 0x80], ecx
jne 0x407372
mov ecx, dword [esi + 0xb0]
lea eax, [esi + 0xa8]
cmp dword [eax], ecx
jbe 0x407372
push eax
push ecx
lea eax, [esi + 0xb8]
push eax
lea eax, [esi + 0xa0]
push eax
call fcn.0040712a
add esp, 0x10
cmp eax, 2
jne 0x40736a
xor eax, eax
jmp 0x407b70
test eax, eax
je 0x407372
push 0x13
jmp 0x4072fe
xor edx, edx
cmp dword [0x425210], edx
jne 0x407a51
mov eax, dword [esi + 0xc0]
push 0x10
pop ebx
mov dword [esp + 0x1c], ebx
cmp eax, edx
je 0x40739d
cmp dword [esi + 0xfc], eax
jae 0x407a58
mov eax, dword [esi + 0xc4]
cmp eax, edx
je 0x4073b3
cmp dword [esi + 0xf8], eax
jae 0x407a58
mov eax, dword [esi + 8]
mov ecx, dword [eax + 0x58]
cmp ecx, edx
je 0x4073c5
cmp dword [esi + 0xfc], ecx
ja 0x4073d4
mov ecx, dword [eax + 0x5c]
cmp ecx, edx
je 0x4073dd
cmp dword [esi + 0xf8], ecx
jbe 0x4073dd
push edx
push esi
call dword [eax + 0x10]
pop ecx
pop ecx
xor edx, edx
xor eax, eax
lea edi, [esi + 0xa8]
mov word [esp + 0x2c], ax
mov word [esp + 0x24], ax
mov eax, dword [edi]
cmp eax, dword [esi + 0xb0]
jbe 0x407405
cmp dword [esi + 0x68], edx
jne 0x407405
mov ecx, ebx
mov word [esp + 0x24], cx
mov ecx, dword [esi + 0xb8]
sub ecx, eax
cmp ecx, dword [esp + 0x44]
jbe 0x407422
cmp dword [esi + 0x68], edx
jne 0x407422
mov eax, 0x300
mov word [esp + 0x2c], ax
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xac]
jbe 0x40743a
cmp dword [esi + 0x6c], edx
jne 0x40743a
or word [esp + 0x2c], bx
mov ecx, dword [esi + 0xb4]
sub ecx, eax
cmp ecx, dword [esp + 0x44]
jbe 0x407465
cmp dword [esi + 0x6c], edx
jne 0x407465
mov eax, dword [esi + 8]
cmp dword [eax + 0x2c], edx
je 0x40745b
cmp dword [esi + 0x30], 6
je 0x407465
mov eax, 0x300
or word [esp + 0x24], ax
mov eax, dword [ebp + 8]
imul eax, eax, 0x3e8
push 2
lea ecx, [esp + 0x24]
mov dword [esp + 0x50], eax
call fcn.00405f26
xor ebx, ebx
cmp eax, ebx
pop ecx
jge 0x4074b9
call sub.WS2_32.dll_WSAGetLastError
mov edi, 0x2733
cmp eax, edi
je 0x40749f
call sub.WS2_32.dll_WSAGetLastError
cmp eax, edi
jne 0x407a5f
call sub.WS2_32.dll_WSAGetLastError
cmp eax, edi
jne 0x407a3d
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x407a3d
xor ecx, ecx
inc ecx
cmp eax, ecx
jl 0x407a66
test byte [esp + 0x26], 7
je 0x4074e8
test dword [esp + 0x26], 0x300
jne 0x4074e8
xor eax, eax
mov word [esp + 0x26], ax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x40], 0x5a
test byte [esp + 0x2e], 7
je 0x40750c
test dword [esp + 0x2e], 0x300
jne 0x40750c
xor eax, eax
mov word [esp + 0x2e], ax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x40], 0x5a
test byte [esp + 0x26], 0x10
je 0x4075d2
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x407532
mov ecx, dword [edi]
sub ecx, dword [esi + 0xb0]
push ebx
push ecx
push esi
call eax
add esp, 0xc
mov dword [esp + 0x18], eax
mov ecx, dword [esi + 0x6c]
cmp ecx, ebx
je 0x40754b
mov eax, dword [esi + 0xb0]
mov edx, dword [edi]
sub ecx, dword [esp + 0x38]
sub edx, eax
cmp ecx, edx
jbe 0x407555
mov eax, dword [esi + 0xb0]
mov ecx, dword [edi]
sub ecx, eax
push dword [esp + 0x1c]
lea edx, [esi + 0xc8]
push edx
push ebx
push ecx
mov ecx, dword [esi + 0xa0]
add ecx, eax
push ecx
push dword [esi + 0x34]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, ebx
jge 0x40758f
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x407a3d
push 0x60
jmp 0x4072fe
add dword [esi + 0xb0], eax
mov ecx, dword [esi + 0xb0]
add dword [esp + 0x38], eax
cmp ecx, dword [edi]
jne 0x4075ab
mov dword [edi], ebx
mov dword [esi + 0xb0], ebx
mov eax, dword [esi + 0x6c]
cmp eax, ebx
je 0x4075bc
cmp eax, dword [esp + 0x38]
jle 0x407a6d
cmp dword [esi + 0x30], 6
jne 0x4075d2
mov eax, dword [esi + 8]
cmp dword [eax + 0x2c], ebx
je 0x4075d2
mov dword [esp + 0x10], 1
test byte [esp + 0x2e], 0x10
je 0x4076a8
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x407602
mov ecx, dword [esi + 0xa4]
sub ecx, dword [esi + 0xac]
push ecx
push ebx
push esi
call eax
add esp, 0xc
cmp eax, dword [esp + 0x18]
jle 0x407602
mov dword [esp + 0x18], eax
mov ecx, dword [esi + 0x68]
cmp ecx, ebx
je 0x40761f
mov eax, dword [esi + 0xac]
mov edx, dword [esi + 0xa4]
sub ecx, dword [esp + 0x34]
sub edx, eax
cmp ecx, edx
jbe 0x40762d
mov eax, dword [esi + 0xac]
mov ecx, dword [esi + 0xa4]
sub ecx, eax
push dword [esp + 0x1c]
lea edx, [esi + 0xd8]
push edx
push ebx
push ecx
mov ecx, dword [esi + 0x9c]
add ecx, eax
push ecx
push dword [esi + 0x38]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, ebx
jge 0x407667
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x407a3d
push 0x61
jmp 0x4072fe
add dword [esi + 0xac], eax
add dword [esp + 0x34], eax
add dword [esi + 0xf8], eax
mov ecx, dword [esi + 0xac]
inc dword [esi + 0x104]
cmp ecx, dword [esi + 0xa4]
jne 0x407697
mov dword [esi + 0xa4], ebx
mov dword [esi + 0xac], ebx
mov eax, dword [esi + 0x68]
cmp eax, ebx
je 0x4076a8
cmp eax, dword [esp + 0x34]
jle 0x407a74
test dword [esp + 0x26], 0x300
je 0x407953
mov eax, dword [esi + 0xa4]
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esi + 0xc8]
push ecx
mov ecx, dword [esi + 0xb4]
push ebx
sub ecx, eax
push ecx
mov ecx, dword [esi + 0x9c]
add ecx, eax
push ecx
push dword [esi + 0x34]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
mov eax, dword [esi + 0xa4]
lea eax, [edi + eax + 4]
cmp eax, dword [esi + 0xb4]
jae 0x407905
mov ebx, dword [sym.imp.WS2_32.dll_getpeername]
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x58]
push eax
push dword [esi + 0x34]
call ebx
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x58]
push eax
push dword [esi + 0x38]
call ebx
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x58]
push eax
push dword [esi + 0x3c]
call ebx
movzx ebx, byte [esi + 0xcf]
movzx edx, byte [esi + 0xce]
movzx ecx, byte [esi + 0xcd]
movzx eax, byte [esi + 0xcc]
push ebx
push edx
push ecx
push eax
push str._nSourceIP:__d._d._d._d
mov ebx, 0x427720
push ebx
call fcn.00409a82
add esp, 0x18
cmp edi, 4
jle 0x407905
cmp byte [0x427720], 0
je 0x407905
mov eax, dword [esi + 0xa4]
mov ecx, dword [esi + 0x9c]
add ecx, eax
add ecx, edi
lea edx, [ecx - 4]
cmp byte [edx], 0xd
jne 0x40780f
cmp byte [ecx - 3], 0xa
jne 0x40780f
cmp byte [ecx - 2], 0xd
jne 0x40780f
cmp byte [ecx - 1], 0xa
jne 0x40780f
mov ecx, ebx
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x4077a4
mov eax, ebx
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4077b3
sub eax, ecx
mov ecx, dword [esi + 0x9c]
add edi, eax
mov eax, dword [esi + 0xa4]
add eax, edi
mov byte [eax + ecx - 4], 0xd
mov eax, dword [esi + 0xa4]
mov ecx, dword [esi + 0x9c]
add eax, edi
mov byte [eax + ecx - 3], 0xa
mov eax, dword [esi + 0xa4]
mov ecx, dword [esi + 0x9c]
add eax, edi
mov byte [eax + ecx - 2], 0xd
mov eax, dword [esi + 0xa4]
mov ecx, dword [esi + 0x9c]
add eax, edi
mov byte [eax + ecx - 1], 0xa
jmp 0x407905
and dword [esp + 0x14], 0
lea ecx, [eax + edi - 4]
test ecx, ecx
jbe 0x407905
mov ecx, dword [esi + 0x9c]
add ecx, 2
cmp byte [ecx - 2], 0xd
jne 0x407840
cmp byte [ecx - 1], 0xa
jne 0x407840
cmp byte [ecx], 0xd
jne 0x407840
cmp byte [ecx + 1], 0xa
je 0x40785a
mov edx, dword [esi + 0xa4]
inc dword [esp + 0x14]
lea edx, [edi + edx - 4]
inc ecx
cmp dword [esp + 0x14], edx
jb 0x407829
jmp 0x407905
sub eax, dword [esp + 0x14]
add eax, edi
mov ebx, eax
lea eax, [ebx + 1]
push eax
call fcn.0040bfd4
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0xa4]
add eax, dword [esp + 0x18]
pop ecx
mov ecx, dword [esi + 0x9c]
add eax, ecx
push ebx
push eax
push dword [esp + 0x44]
mov dword [esp + 0x5c], eax
call fcn.0040e5b0
mov eax, 0x427720
add esp, 0xc
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40789c
sub eax, ecx
push eax
push 0x427720
push dword [esp + 0x58]
call fcn.0040e5b0
mov eax, 0x427720
add esp, 0xc
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4078bf
sub eax, ecx
mov ecx, dword [esp + 0x14]
add eax, ecx
add eax, dword [esi + 0xa4]
push ebx
add eax, dword [esi + 0x9c]
push dword [esp + 0x40]
push eax
call fcn.0040e5b0
add esp, 0xc
push dword [esp + 0x3c]
call fcn.0040b479
mov eax, 0x427720
pop ecx
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4078fa
sub eax, ecx
add edi, eax
test edi, edi
jne 0x407932
push 2
push dword [esi + 0x34]
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [esi + 0x34]
call sub.WS2_32.dll_closesocket
or dword [esi + 0x34], 0xffffffff
or dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x10], 1
jmp 0x407a23
jge 0x40794b
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x407a3d
push 0x5e
jmp 0x4072fe
add dword [esi + 0xa4], edi
xor ebx, ebx
cmp dword [esp + 0x10], ebx
jne 0x407a23
test dword [esp + 0x2e], 0x300
je 0x407a23
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x68]
push ecx
mov ecx, dword [esi + 0xb8]
lea ebx, [esi + 0xa8]
mov eax, dword [ebx]
push 0
sub ecx, eax
push ecx
lea edi, [esi + 0xa0]
mov ecx, dword [edi]
add ecx, eax
push ecx
push dword [esi + 0x38]
mov dword [esp + 0x34], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jne 0x4079cc
push 2
pop edi
push edi
push dword [esi + 0x38]
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [esi + 0x38]
call sub.WS2_32.dll_closesocket
or dword [esi + 0x38], 0xffffffff
or dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x10], edi
jmp 0x407a23
jge 0x4079e5
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x407372
push 0x5d
jmp 0x4072fe
add dword [ebx], eax
inc dword [esi + 0x100]
add dword [esi + 0xfc], eax
cmp dword [esi + 0x80], 0
mov ecx, dword [ebx]
jne 0x407a23
push ebx
sub ecx, eax
push ecx
lea eax, [esi + 0xb8]
push eax
push edi
call fcn.0040712a
add esp, 0x10
cmp eax, 2
je 0x407363
test eax, eax
jne 0x40736e
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x407a3d
cmp eax, dword [esp + 0x4c]
jg 0x407a7b
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
and dword [esp + 0x18], 0
cmp dword [esp + 0x10], 0
je 0x407372
cmp dword [0x425210], 0
je 0x407a82
push 0x59
jmp 0x4072fe
push 0xa
jmp 0x4072fe
push 0x5b
jmp 0x4072fe
push 0x5c
jmp 0x4072fe
push 0x62
jmp 0x4072fe
push 0x63
jmp 0x4072fe
push 0x5f
jmp 0x4072fe
cmp dword [esi + 0x68], 0
jne 0x407af9
mov eax, dword [esi + 0xa8]
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jbe 0x407af9
mov edi, dword [esi + 0x34]
cmp edi, 0xffffffff
je 0x407af9
mov edx, dword [0x4251b0]
imul edx, edx, 0x3e8
sub eax, ecx
push edx
push eax
mov eax, dword [esi + 0xa0]
add eax, ecx
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.00407163
xor edx, edx
add esp, 0x10
cmp eax, edx
jle 0x407af9
add dword [esi + 0xb0], eax
mov ecx, dword [esi + 0xb0]
add dword [esi + 0xfc], eax
cmp ecx, dword [esi + 0xa8]
jne 0x407af4
mov dword [esi + 0xa8], edx
mov dword [esi + 0xb0], edx
cmp dword [esi + 0x68], edx
je 0x407a88
xor ebx, ebx
jmp 0x407b67
mov eax, dword [esi + 0xa4]
mov ecx, dword [esi + 0xac]
cmp eax, ecx
jbe 0x407b6c
mov edi, dword [esi + 0x38]
cmp edi, 0xffffffff
je 0x407b6c
mov edx, dword [0x4251b0]
imul edx, edx, 0x3e8
sub eax, ecx
push edx
push eax
mov eax, dword [esi + 0x9c]
add eax, ecx
push eax
lea eax, [esi + 0xd8]
push eax
call fcn.00407163
add esp, 0x10
cmp eax, ebx
jle 0x407b6c
add dword [esi + 0xac], eax
mov ecx, dword [esi + 0xac]
add dword [esi + 0xf8], eax
cmp dword [esi + 0xa4], ecx
jne 0x407b67
mov dword [esi + 0xac], ebx
mov dword [esi + 0xa4], ebx
cmp dword [esi + 0x6c], ebx
je 0x407afd
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x74]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040904e
mov esp, ebp
pop ebp
ret