Function at 0x410430
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x2040
call fcn.0041e9c0
mov ebp, dword [esp + 0x2058]
lea eax, [esp + 4]
mov dword [esp + 0x20], edx
mov dword [esp], ecx
push ebp
push dword [esp + 0x2058]
push eax
call fcn.0041d410
add esp, 0xc
mov ecx, dword [esp + 8]
mov eax, dword [esp + 4]
movzx edx, word [esp + 0xc]
xor esi, esi
mov dword [esp + 0x10], ecx
test dx, dx
je 0x4104a0
nop dword [eax]
xor edi, edi
cmp esi, 0x1000
jne 0x410580
jmp 0x410596
cmp eax, ecx
je 0x41059d
movzx ebx, byte [eax]
movzx edx, bl
test bl, bl
js 0x4104d0
inc eax
xor edi, edi
cmp esi, 0x1000
jne 0x410580
jmp 0x410596
movzx ecx, byte [eax + 1]
and edx, 0x1f
and ecx, 0x3f
cmp bl, 0xdf
jbe 0x410521
movzx edi, byte [eax + 2]
shl ecx, 6
and edi, 0x3f
or edi, ecx
cmp bl, 0xf0
jb 0x41052b
movzx ecx, byte [eax + 3]
and edx, 7
shl edi, 6
mov ebx, edx
shl ebx, 0x12
and ecx, 0x3f
or ecx, edi
mov edx, ecx
or edx, ebx
cmp edx, 0x110000
je 0x41059d
add eax, 4
cmp edx, 0xffff
jbe 0x41053b
jmp 0x41054b
shl edx, 6
add eax, 2
or edx, ecx
jmp 0x41053b
shl edx, 0xc
add eax, 3
or edx, edi
cmp edx, 0xffff
ja 0x41054b
mov ecx, dword [esp + 0x10]
xor edi, edi
cmp esi, 0x1000
jne 0x410580
jmp 0x410596
add edx, 0xffff0000
mov ecx, edx
and edx, 0x3ff
shr ecx, 0xa
or edx, 0xdc00
or ecx, 0xd800
mov edi, edx
mov edx, ecx
mov ecx, dword [esp + 0x10]
cmp esi, 0x1000
je 0x410596
nop dword [eax + eax]
mov word [esp + esi*2 + 0x40], dx
inc esi
mov edx, edi
test dx, dx
jne 0x410480
jmp 0x4104a0
mov esi, 0x1000
jmp 0x4105a9
cmp esi, 0x1001
jae 0x410883
lea ebx, [esp + 0x40]
mov dword [esp + 4], 0
push 0
lea eax, [esp + 8]
push eax
push esi
push ebx
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x410841
mov edi, dword [esp + 4]
cmp edi, esi
je 0x41085e
jae 0x410872
movzx eax, word [esp + edi*2 + 0x40]
add eax, 0x2312
movzx eax, ax
cmp eax, 0x312
jae 0x410621
lea eax, [esp + edi*2 + 0x40]
inc edi
mov dword [esp + 4], 0
push 0
lea ecx, [esp + 8]
push ecx
push 1
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x410621
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, esi
ja 0x410890
test edi, edi
je 0x41085c
lea eax, [edi - 1]
xor ebp, ebp
and eax, 0x7fffffff
cmp eax, 7
jb 0x4107ef
inc eax
pxor xmm1, xmm1
lea edx, [esp + 0x48]
pxor xmm2, xmm2
mov ecx, eax
and ecx, 0xfffffff8
lea ebx, [esp + ecx*2 + 0x40]
mov esi, ecx
nop dword [eax]
movq xmm7, qword [edx - 8]
movq xmm4, qword [edx]
movdqu xmmword [esp + 0x10], xmm1
movdqa xmm1, xmmword [0x42f880]
movdqu xmmword [esp + 0x20], xmm2
movdqa xmm2, xmmword [0x42f890]
add edx, 0x10
add esi, 0xfffffff8
movdqa xmm0, xmm7
movdqa xmm6, xmm4
movdqa xmm3, xmm7
movdqu xmmword [esp + 0x30], xmm4
paddw xmm0, xmm1
paddw xmm6, xmm1
movdqa xmm1, xmmword [0x42f860]
movdqa xmm5, xmm1
pxor xmm0, xmm1
movdqa xmm1, xmm2
pxor xmm6, xmm5
pcmpgtw xmm1, xmm0
movdqa xmm5, xmmword [0x42f8b0]
pcmpgtw xmm2, xmm6
punpcklwd xmm1, xmm1
punpcklwd xmm6, xmm2
movdqa xmm2, xmmword [0x42f8a0]
psrad xmm1, 0x10
movdqa xmm0, xmm1
psrad xmm6, 0x10
pand xmm1, xmm5
pandn xmm0, xmm2
movdqu xmm2, xmmword [esp + 0x20]
por xmm1, xmm0
movdqa xmm0, xmm6
pand xmm6, xmm5
movdqa xmm5, xmmword [0x42f860]
pandn xmm0, xmmword [0x42f8a0]
pxor xmm3, xmm5
por xmm6, xmm0
movdqa xmm0, xmmword [0x42f8c0]
paddw xmm7, xmm0
paddw xmm4, xmm0
movdqa xmm0, xmmword [0x42f8d0]
pxor xmm7, xmm5
pxor xmm4, xmm5
movdqa xmm5, xmmword [0x42f8b0]
pcmpgtw xmm0, xmm7
movdqa xmm7, xmmword [0x42f8d0]
punpcklwd xmm0, xmm0
pand xmm0, xmm5
pcmpgtw xmm7, xmm4
movdqa xmm4, xmmword [0x42f870]
pcmpgtw xmm3, xmm4
pcmpeqd xmm4, xmm4
punpcklwd xmm3, xmm3
psubd xmm0, xmm4
psrad xmm3, 0x10
pand xmm1, xmm3
pandn xmm3, xmm0
por xmm3, xmm1
movdqu xmm1, xmmword [esp + 0x10]
paddd xmm1, xmm3
movdqu xmm3, xmmword [esp + 0x30]
pxor xmm3, xmmword [0x42f860]
pcmpgtw xmm3, xmmword [0x42f870]
punpcklwd xmm3, xmm3
psrad xmm3, 0x10
punpcklwd xmm7, xmm3
pand xmm6, xmm3
pand xmm7, xmm5
psubd xmm7, xmm4
pandn xmm3, xmm7
por xmm3, xmm6
paddd xmm2, xmm3
jne 0x410660
paddd xmm2, xmm1
cmp eax, ecx
pshufd xmm0, xmm2, 0xee
paddd xmm0, xmm2
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd ebp, xmm1
je 0x41085e
lea eax, [esp + edi*2 + 0x40]
jmp 0x410806
add ebp, edx
cmp ebx, eax
je 0x41085e
movzx ecx, word [ebx]
add ebx, 2
mov edx, 1
cmp cx, 0x7f
jbe 0x410800
movzx esi, cx
mov edx, 2
cmp esi, 0x800
jb 0x410800
add ecx, 0x2312
xor edx, edx
movzx ecx, cx
cmp ecx, 0x312
setae dl
lea edx, [edx + edx + 1]
jmp 0x410800
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
mov byte [ecx], 0
mov byte [ecx + 3], 0
mov word [ecx + 1], 0
mov dword [ecx + 4], eax
jmp 0x410867
xor ebp, ebp
mov eax, dword [esp]
mov dword [eax + 4], ebp
mov byte [eax], 4
add esp, 0x2040
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x430c4c
push esi
push edi
call fcn.0042e5c0
add esp, 0xc
ud2
push 0x430c3c
push 0x1000
push esi
jmp 0x410897
push 0x430c5c
push esi
push edi
call fcn.0042e6e0
add esp, 0xc
ud2