Function at 0x420f72
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push 8
pop ebx
cdq
mov ecx, ebx
idiv ecx
test edx, edx
jne 0x4211b9
cmp dword [ebp + 0xc], 0x10
jl 0x4211b9
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_htonl]
mov esi, eax
mov al, byte [ebp + 0x10]
mov byte [ebp - 0x40], al
lea eax, [ebp - 0x40]
push 5
push eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3f], esi
push eax
call fcn.0041feac
mov al, byte [ebp + 0x14]
push 5
mov byte [ebp - 0x30], al
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x2f], esi
call fcn.0041feac
lea eax, [ebp - 0x40]
push 0x20
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0041feac
mov esi, dword [ebp + 0x1c]
lea eax, [ebp - 0x20]
add esp, 0x24
xor edi, edi
sub esi, eax
lea eax, [ebp + edi - 0x20]
mov cl, byte [esi + eax]
xor byte [eax], cl
inc edi
cmp edi, 0x10
jb 0x420fef
mov esi, dword [ebp + 8]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.004211c0
mov cl, byte [ebp - 8]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x24]
and ecx, 7
sub eax, ecx
add esp, 0xc
sub eax, 0xa
cmp dword [edx], eax
jl 0x4211b9
test eax, eax
jl 0x4211b9
mov dword [edx], eax
xor eax, eax
lea edi, [ebp - 0x10]
mov dword [ebp + 0x14], ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x10]
mov edi, esi
mov dword [ebp + 0x1c], eax
add esi, ebx
lea eax, [ecx + 1]
mov dword [ebp + 0x18], 1
cmp eax, ebx
jge 0x42105d
inc eax
inc dword [ebp + 0x18]
jmp 0x4210b7
jne 0x4210b7
mov dword [ebp + 0x1c], edi
mov edi, dword [ebp + 0x14]
mov dword [ebp + 0x10], esi
lea eax, [ebp - 8]
xor edx, edx
sub edi, esi
sub dword [ebp + 0x10], eax
mov dword [ebp + 8], esi
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + edx - 8]
add ecx, eax
lea ebx, [ecx + edi]
cmp ebx, dword [ebp + 0xc]
jge 0x4211b9
mov cl, byte [ecx]
push 8
xor byte [eax], cl
inc edx
pop ebx
cmp edx, ebx
jl 0x421075
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 8]
push eax
call fcn.004211c0
add dword [ebp + 0x14], ebx
mov edx, dword [ebp + 0x24]
mov edi, dword [ebp + 8]
add esp, 0xc
add esi, ebx
xor eax, eax
cmp dword [ebp + 0x18], 2
jle 0x421053
mov edx, dword [edx]
test edx, edx
mov dword [ebp + 0x24], edx
je 0x42113f
cmp eax, ebx
jge 0x4210e2
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
mov cl, byte [eax + ecx]
xor cl, byte [ebp + eax - 8]
inc dword [ebp + 0x20]
inc eax
dec dword [ebp + 0x24]
mov byte [edx], cl
jmp 0x421139
jne 0x421139
mov dword [ebp + 0x1c], edi
mov edi, dword [ebp + 0x14]
mov dword [ebp + 0x10], esi
lea eax, [ebp - 8]
xor edx, edx
sub edi, esi
sub dword [ebp + 0x10], eax
mov dword [ebp + 8], esi
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + edx - 8]
add ecx, eax
lea ebx, [ecx + edi]
cmp ebx, dword [ebp + 0xc]
jge 0x4211b9
mov cl, byte [ecx]
push 8
xor byte [eax], cl
inc edx
pop ebx
cmp edx, ebx
jl 0x4210fa
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 8]
push eax
call fcn.004211c0
add dword [ebp + 0x14], ebx
mov edi, dword [ebp + 8]
add esp, 0xc
add esi, ebx
xor eax, eax
cmp dword [ebp + 0x24], 0
jne 0x4210c6
mov dword [ebp + 0x18], 1
cmp eax, ebx
jge 0x42115c
mov ecx, dword [ebp + 0x1c]
mov cl, byte [eax + ecx]
xor cl, byte [ebp + eax - 8]
jne 0x4211b9
inc eax
inc dword [ebp + 0x18]
jmp 0x4211af
jne 0x4211af
mov dword [ebp + 0x1c], edi
mov edi, dword [ebp + 0x14]
mov dword [ebp + 0x10], esi
lea eax, [ebp - 8]
xor edx, edx
sub edi, esi
sub dword [ebp + 0x10], eax
mov dword [ebp + 8], esi
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + edx - 8]
add ecx, eax
lea ebx, [ecx + edi]
cmp ebx, dword [ebp + 0xc]
jge 0x4211b9
mov cl, byte [ecx]
push 8
xor byte [eax], cl
inc edx
pop ebx
cmp edx, ebx
jl 0x421174
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 8]
push eax
call fcn.004211c0
add dword [ebp + 0x14], ebx
mov edi, dword [ebp + 8]
add esp, 0xc
add esi, ebx
xor eax, eax
cmp dword [ebp + 0x18], 7
jle 0x421146
mov al, 1
jmp 0x4211bb
xor al, al
pop edi
pop esi
pop ebx
leave
ret