Function at 0x404dbd
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
mov eax, dword [0x590cec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 0x28]
push esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp + 0x24]
xor esi, esi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x44], ebx
cmp eax, esi
je 0x405041
cmp edx, esi
je 0x405041
cmp ecx, esi
je 0x405041
cmp ebx, esi
je 0x405041
cmp dword [ebp + 8], esi
je 0x404f01
mov dword [ecx], esi
mov ecx, edi
call fcn.00404ce9
test eax, eax
je 0x40502c
push esi
push esi
push 0x5441c4
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x34], esi
call dword [edi + 4]
test eax, eax
jne 0x40502c
cmp dword [ebp - 0x28], esi
je 0x40502c
mov ecx, dword [ebp - 0x40]
cmp dword [ecx], 0x4d42444b
mov eax, str.KeyDataBlob
je 0x404e6c
mov eax, str.OpaqueKeyBlob
push esi
push dword [ebp + 0x20]
push ecx
push esi
push esi
lea ecx, [ebp - 0x2c]
push ecx
push eax
push esi
push dword [ebp - 0x28]
call dword [edi + 8]
test eax, eax
jne 0x404ed9
cmp dword [ebp - 0x2c], esi
je 0x404ee4
push 1
push ebx
push esi
push esi
push dword [ebp + 0x18]
push dword [ebp - 0x38]
push esi
push dword [ebp + 0x10]
push dword [ebp - 0x3c]
push dword [ebp - 0x2c]
call dword [edi + 0x10]
test eax, eax
jne 0x404ed9
push dword [ebx]
call fcn.004b6e34
pop ecx
mov ecx, dword [ebp - 0x30]
mov dword [ecx], eax
cmp eax, esi
je 0x404ed9
push 1
push ebx
push dword [ebx]
push eax
push dword [ebp + 0x18]
push dword [ebp - 0x38]
push esi
push dword [ebp + 0x10]
push dword [ebp - 0x3c]
push dword [ebp - 0x2c]
call dword [edi + 0x10]
test eax, eax
jne 0x404ed9
mov dword [ebp - 0x34], 1
cmp dword [ebp - 0x2c], esi
je 0x404ee4
push dword [ebp - 0x2c]
call dword [edi + 0x1c]
cmp dword [ebp - 0x28], esi
je 0x404ef0
push esi
push dword [ebp - 0x28]
call dword [edi + 0x18]
cmp dword [ebp - 0x34], esi
je 0x40502c
xor eax, eax
inc eax
jmp 0x405043
push dword [ebp + 0x10]
call fcn.004b6e34
pop ecx
mov ecx, dword [ebp - 0x30]
mov dword [ecx], eax
cmp eax, esi
je 0x405041
mov eax, dword [ebp + 0x10]
push 0x10
mov dword [ebx], eax
lea eax, [ebp - 0x24]
push esi
push eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x34], esi
call fcn.004f42d0
add esp, 0xc
cmp dword [ebp - 0x38], esi
je 0x404f54
mov eax, dword [ebp + 0x18]
cmp eax, 0x10
jb 0x404f44
push 0x10
pop eax
push eax
push dword [ebp - 0x38]
lea eax, [ebp - 0x24]
push eax
call fcn.004f4490
add esp, 0xc
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 0x20]
mov ecx, edi
push dword [ebp - 0x40]
call fcn.00404c69
test eax, eax
je 0x404f96
mov eax, dword [ebp - 0x34]
shl eax, 3
push eax
push dword [ebp - 0x2c]
lea eax, [ebp - 0x138]
push eax
call fcn.00402ed5
add esp, 0xc
cmp dword [ebp - 0x2c], esi
je 0x404faf
push dword [ebp - 0x2c]
call fcn.004b6e29
pop ecx
jmp 0x404faf
mov eax, dword [ebp + 0x20]
shl eax, 3
push eax
push dword [ebp - 0x40]
lea eax, [ebp - 0x138]
push eax
call fcn.00402ed5
add esp, 0xc
cmp dword [ebp + 0x10], esi
jbe 0x405018
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x28]
lea ebx, [eax + ecx]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x138]
push ebx
push eax
call fcn.0040344c
mov eax, dword [ebp - 0x24]
xor dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x20]
xor dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
xor dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
xor dword [ebp - 8], eax
push 0x10
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
add eax, dword [ebp - 0x28]
push eax
call fcn.004f4490
push 0x10
lea eax, [ebp - 0x24]
push ebx
push eax
call fcn.004f4490
add dword [ebp - 0x28], 0x10
mov eax, dword [ebp - 0x28]
add esp, 0x24
cmp eax, dword [ebp + 0x10]
jb 0x404fb4
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x30]
push ebx
push dword [eax]
mov ecx, edi
call fcn.00404c1b
test eax, eax
jmp 0x404ef3
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
cmp eax, esi
je 0x405041
push eax
call fcn.004b6e29
mov eax, dword [ebp - 0x30]
pop ecx
mov dword [eax], esi
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f41b5
leave
ret 0x24