Function at 0x436040
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x40
mov eax, dword [esp + 0x54]
mov ebx, 0xf
test eax, eax
je 0x43617e
cmp byte [edx], 0
je 0x436185
lea ebx, [eax + 3]
mov ebp, ebx
and ebp, 0xfffffffc
cmp ebp, 0x7ffffffd
jae 0x4361a4
mov esi, 4
test ebp, ebp
mov eax, 4
mov dword [esp + 0xc], ecx
je 0x43609f
mov edi, edx
mov ecx, 8
mov edx, ebp
call fcn.00490be0
test eax, eax
je 0x4361a4
mov edx, edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x54]
mov edi, ebx
mov dword [esp], ebx
xor ebx, ebx
shr edi, 2
mov ecx, eax
and ecx, 3
cmovne esi, ecx
mov ecx, eax
setne bl
mov eax, dword [esp + 0x1c]
shr ecx, 2
add ebx, ecx
mov ecx, dword [esp]
cmp ebx, edi
ja 0x4361da
cmp ecx, 4
jb 0x4360f7
push ebp
push 0
push eax
mov ebp, edi
mov dword [esp + 0x14], ebx
mov edi, edx
mov ebx, eax
call sub.VCRUNTIME140.dll_memset
mov eax, ebx
mov ebx, dword [esp + 0x14]
mov edx, edi
mov edi, ebp
add esp, 0xc
test ebx, ebx
je 0x43618c
lea ecx, [ebx - 1]
cmp ecx, edi
jae 0x436193
mov dword [esp + 8], ebx
mov cl, 1
xor ebp, ebp
xor ebx, ebx
mov dword [esp + 0x14], edi
mov dword [esp + 4], 0
mov edi, dword [esp + 0x54]
sub edi, ebx
cmovb edi, ebp
jbe 0x4361ab
mov byte [esp + 0x18], cl
mov ecx, dword [esp + 4]
dec esi
inc ecx
mov dword [esp + 0x10], ecx
xor ecx, ecx
nop
movzx ebp, byte [edx + ebx]
shl ecx, 8
inc ebx
or ecx, ebp
sub esi, 1
jb 0x436154
dec edi
jne 0x436140
jmp 0x4361a6
mov edi, dword [esp + 4]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 8]
not edi
mov dword [esp + 4], ebp
add edi, esi
cmp ebp, esi
mov esi, 4
mov ebp, 0
mov dword [eax + edi*4], ecx
setb cl
jne 0x436120
jmp 0x4361ab
mov esi, 0x732fbe
jmp 0x4361fc
mov esi, 0x732fcd
jmp 0x4361fc
mov ecx, dword [esp]
xor ebx, ebx
jmp 0x4361b7
mov ecx, eax
mov eax, dword [esp + 0x54]
dec esi
dec eax
cmp esi, eax
mov eax, ecx
mov ecx, dword [esp]
ja 0x4361da
ud2
movzx ecx, byte [esp + 0x18]
test cl, 1
mov edi, dword [esp + 0x14]
mov ecx, dword [esp]
jne 0x4361da
cmp ebx, dword [esp + 0x54]
jne 0x4361da
mov ebp, eax
cmp ecx, 0x403
jbe 0x436217
mov ecx, dword [esp + 0xc]
mov ebx, 8
mov esi, 0x732fec
jmp 0x43626f
mov esi, 0x732fbe
cmp ecx, 4
jb 0x4361f3
push eax
push 0
push dword [0x776180]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0xc]
mov ebx, 0xf
mov dword [ecx + 8], esi
mov dword [ecx + 0xc], ebx
mov dword [ecx + 4], 0
mov dword [ecx], 0
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, ecx
cmp ecx, 0x10
mov ecx, dword [esp + 0xc]
jae 0x436233
mov ebx, 0xf
mov esi, 0x732fbe
cmp eax, 4
jb 0x4361fc
jmp 0x43626f
mov ebx, edi
mov edi, ecx
push ebx
mov esi, ebp
push ebp
call fcn.004e05f0
add esp, 8
test eax, eax
je 0x436253
mov ebx, 0x10
mov esi, 0x732fdc
jmp 0x43626d
push ebx
push 3
push esi
call fcn.004e0760
add esp, 0xc
test eax, eax
je 0x436287
mov ebx, 0xf
mov esi, 0x732fbe
mov ecx, edi
push ebp
push 0
push dword [0x776180]
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, edi
jmp 0x4361fc
push dword [esi + 4]
push dword [esi]
call fcn.004e1ab0
add esp, 8
mov dword [esp + 8], edx
mov ecx, esi
mov edx, ebx
mov dword [esp + 4], eax
mov dword [esp + 0x14], ebx
call fcn.00436690
mov edx, dword [esp + 0x60]
mov esi, dword [esp + 4]
mov ecx, dword [esp + 8]
mov ebx, eax
cmp edx, 0x400
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], ecx
jb 0x4361a4
mov eax, ebx
mov ecx, ebx
mov esi, str.TooSmallPublicKeyIsMissing
shr eax, 2
shr ecx, 1
or ecx, eax
or ecx, ebx
and ecx, 1
lea eax, [ebx + ecx*8]
and eax, 0xfffffff8
cmp eax, edx
jb 0x4362f9
cmp ebx, dword [esp + 0x64]
mov esi, 0x732fec
jbe 0x436314
push ebp
push 0
push dword [0x776180]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, 8
mov ecx, edi
jmp 0x4361fc
mov edx, dword [esp]
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x10], ebx
and edx, 0x7fc
mov dword [esp + 0x24], edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], ebx
je 0x436359
mov ecx, 8
call fcn.00490be0
test eax, eax
je 0x4361a4
mov edx, eax
jmp 0x43635e
mov edx, 4
xor eax, eax
cmp dword [esp], 0x20
mov ebx, ebp
jb 0x43639c
mov eax, edi
xor ecx, ecx
pcmpeqd xmm0, xmm0
and eax, 0x1f8
movdqu xmm1, xmmword [ebx + ecx*4]
movdqu xmm2, xmmword [ebx + ecx*4 + 0x10]
pxor xmm1, xmm0
pxor xmm2, xmm0
movdqu xmmword [edx + ecx*4], xmm1
movdqu xmmword [edx + ecx*4 + 0x10], xmm2
add ecx, 8
cmp eax, ecx
jne 0x436375
jmp 0x4363a5
mov ecx, dword [ebx + eax*4]
not ecx
mov dword [edx + eax*4], ecx
inc eax
cmp edi, eax
jne 0x43639c
mov eax, edi
or byte [edx], 1
mov dword [esp + 0x18], esi
mov dword [esp], edx
shl eax, 5
mov ecx, eax
sub ecx, dword [esp + 0x10]
je 0x4363ee
mov edx, dword [esp]
mov esi, dword [esp]
mov edx, dword [edx + edi*4 - 4]
shl edx, cl
shr edx, cl
mov dword [esi + edi*4 - 4], edx
mov esi, dword [esp + 0x10]
mov edx, dword [esp]
sub esi, eax
push edi
push ebx
push edx
push edx
call fcn.004e0880
mov edx, dword [esp + 0x10]
add esp, 0x10
inc esi
jne 0x4363db
mov esi, edi
push edi
push ebx
push edx
push edx
call fcn.004e0880
mov edx, dword [esp + 0x10]
add esp, 0x10
dec esi
jne 0x4363f0
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push edx
push edx
push edx
mov esi, edx
call fcn.004d03c0
add esp, 0x18
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
push esi
push esi
call fcn.004d03c0
add esp, 0x18
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
push esi
push esi
call fcn.004d03c0
add esp, 0x18
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
push esi
push esi
call fcn.004d03c0
add esp, 0x18
push edi
lea eax, [esp + 0x2c]
push eax
push ebx
push esi
push esi
push esi
call fcn.004d03c0
add esp, 0x18
mov edi, dword [esp + 0x5c]
cmp edi, 5
jbe 0x436477
mov dword [esp + 4], 0x732fec
mov esi, 8
jmp 0x4364f1
test edi, edi
mov dword [esp + 4], 0x732fcd
je 0x4364c0
mov ebx, dword [esp + 0x58]
mov esi, 0xf
cmp byte [ebx], 0
je 0x4364f1
xor eax, eax
xor ecx, ecx
movzx edx, byte [ebx]
shld ecx, eax, 8
shl eax, 8
inc ebx
or eax, edx
dec edi
jne 0x436495
cmp eax, dword [esp + 0x68]
mov edi, ecx
mov dword [esp + 4], str.TooSmallPublicKeyIsMissing
sbb edi, dword [esp + 0x6c]
jae 0x4364c7
mov esi, 8
jmp 0x4364f1
mov esi, 0xf
jmp 0x4364f1
test ecx, 0xfffffffe
mov esi, 8
mov dword [esp + 4], 0x732fec
jne 0x4364f1
movzx edx, dl
test dl, 1
jne 0x43652f
mov esi, 0x10
mov dword [esp + 4], 0x732fdc
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 4]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], esi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [eax + 4], 0
mov dword [eax], 0
push ebp
push 0
push dword [0x776180]
call esi
push dword [esp]
push 0
push dword [0x776180]
call esi
jmp 0x43620f
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 8]
mov dword [edx], eax
mov eax, dword [esp + 0x14]
mov dword [edx + 4], ecx
mov dword [edx + 8], ebp
mov dword [edx + 0xc], eax
mov dword [edx + 0x10], edi
mov dword [edx + 0x14], esi
mov edi, dword [esp + 0x10]
mov esi, dword [esp]
mov dword [edx + 0x18], edi
mov dword [edx + 0x1c], esi
mov dword [edx + 0x20], eax
jmp 0x43620f