Function at 0x412140
Capabilities:
Encode data using xor
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x47b014]
xor eax, ebp
mov dword [ebp - 4], eax
mov al, byte [edx + 0xc]
push ebx
mov ebx, dword [ecx + 0x3fa0]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], ebx
cmp al, 0xfd
je 0x412406
cmp al, 0xfc
je 0x4123fe
mov esi, edx
mov byte [ebp - 0x2d], 1
mov dword [esi], 0
movzx eax, word [esi + 0xd]
mov ecx, eax
mov dword [ebp - 8], ecx
shr ecx, 8
add cl, 0x55
add cl, byte [esi + 0xc]
add cl, al
cmp dword [0x483af8], 0
mov byte [esi + 0xf], cl
jne 0x4121a8
call fcn.00414d10
mov eax, dword [ebp - 8]
mov edx, 0xffff
movzx eax, ax
mov edi, edx
add eax, 3
mov word [esi], di
mov edi, dword [ebp - 0x34]
xor ecx, ecx
shr eax, 2
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
test eax, eax
je 0x41222c
mov al, byte [ebp - 0x2d]
lea edi, [esi + 0x10]
mov byte [ebp - 0x2d], al
xor ebx, ebx
mov eax, dword [edi]
lea edi, [edi + 4]
xor edx, eax
add ebx, eax
mov eax, edx
shr eax, 0x10
movzx ecx, al
mov eax, edx
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x481ef8]
xor ecx, dword [eax*4 + 0x4822f8]
mov eax, edx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x481af8]
movzx eax, dl
xor ecx, dword [eax*4 + 0x4826f8]
sub dword [ebp - 0xc], 1
mov edx, ecx
jne 0x4121d8
mov edi, dword [ebp - 0x34]
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0xc]
lea eax, [eax*4 + 0x10]
mov dword [esi + 4], edx
mov dword [ebp - 0x18], eax
xorps xmm0, xmm0
mov dword [esi + 8], ecx
mov eax, dword [ebx + 0x10c8]
mov dword [ebp - 0x14], esi
xor esi, esi
push esi
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
push eax
push esi
lea eax, [ebp - 8]
movlpd qword [ebp - 0x2c], xmm0
push eax
push 1
lea eax, [ebp - 0x18]
movlpd qword [ebp - 0x24], xmm0
push eax
push dword [ebx]
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.WS2_32.dll_WSASend]
test eax, eax
je 0x4122b5
cmp eax, 0xffffffff
jne 0x4123bd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
jne 0x4123bd
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], esi
push eax
push 1
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
test eax, eax
jne 0x4122b5
mov esi, 9
test esi, esi
jne 0x4123c2
cmp byte [ebp - 0x2d], 0
je 0x41243e
push 0x10
mov edx, edi
mov ecx, ebx
call fcn.00412070
mov esi, eax
add esp, 4
test esi, esi
jne 0x4123c2
movzx edx, word [edi + 0xd]
movzx ecx, byte [edi + 0xc]
mov eax, edx
shr eax, 8
add ecx, edx
add eax, 0x55
add eax, ecx
cmp byte [edi + 0xf], al
jne 0x4123bd
lea eax, [edx + 3]
and eax, 0xfffffffc
cmp eax, 0x108e
ja 0x4123bd
test eax, eax
je 0x4123eb
lea edx, [edi + 0x10]
mov ecx, ebx
push eax
mov dword [ebp - 8], edx
call fcn.00412070
mov esi, eax
add esp, 4
mov dword [ebp - 0xc], esi
test esi, esi
jne 0x4123c2
cmp dword [0x483af8], eax
jne 0x412340
call fcn.00414d10
movzx eax, word [edi + 0xd]
xor ecx, ecx
movzx edx, word [edi]
add eax, 3
shr eax, 2
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4123b3
mov edi, dword [ebp - 8]
mov ebx, eax
xor esi, esi
nop dword [eax]
mov eax, dword [edi]
lea edi, [edi + 4]
xor edx, eax
add esi, eax
mov eax, edx
shr eax, 0x10
movzx ecx, al
mov eax, edx
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x481ef8]
xor ecx, dword [eax*4 + 0x4822f8]
mov eax, edx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x481af8]
movzx eax, dl
xor ecx, dword [eax*4 + 0x4826f8]
mov edx, ecx
sub ebx, 1
jne 0x412360
mov edi, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
cmp dword [edi + 4], edx
jne 0x4123bd
cmp dword [edi + 8], ecx
je 0x4123eb
mov esi, 9
test ebx, ebx
je 0x4123e4
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x4123e4
push 2
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [ebx]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx], 0xffffffff
mov byte [ebx + 0x10a2], 1
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422009
mov esp, ebp
pop ebp
ret
cmp al, 0xfd
jne 0x4122c7
push 0
push 0
lea eax, [ebp - 0xc]
mov dword [ebp - 8], esi
push eax
push 4
lea eax, [ebp - 8]
mov dword [ebp - 0xc], esi
push eax
push 0
push 0
push 0x4004667f
push dword [ebx]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x41245b
cmp dword [ebp - 0xc], 4
jne 0x41245b
cmp dword [ebp - 8], esi
ja 0x4122c7
mov ecx, dword [ebp - 4]
xor eax, eax
mov word [edi + 0xd], ax
xor ecx, ebp
mov byte [edi + 0xc], 0xfe
mov eax, esi
pop edi
pop esi
pop ebx
call fcn.00422009
mov esp, ebp
pop ebp
ret
mov esi, 6
jmp 0x4123c2