Function at 0x4023f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
mov eax, dword [0x45ffac]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
mov esi, dword [esp + 0x38]
mov ebx, ecx
cmp dword [ebx], 0
push edi
mov edi, dword [esp + 0x44]
je 0x402429
pop edi
pop esi
mov eax, 0xfffffffb
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00431b61
add esp, 0x2c
ret 0xc
cmp dword [ebx + 8], 1
je 0x402448
pop edi
pop esi
mov eax, 0xfffffffa
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00431b61
add esp, 0x2c
ret 0xc
test esi, esi
je 0x40264b
mov eax, dword [esp + 0x40]
test eax, eax
jle 0x40264b
mov ecx, eax
and ecx, 0x8000000f
jns 0x40246b
dec ecx
or ecx, 0xfffffff0
inc ecx
je 0x402486
pop edi
pop esi
mov eax, 0xfffffff9
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00431b61
add esp, 0x2c
ret 0xc
mov ecx, dword [ebx + 4]
cdq
and edx, 0xf
add eax, edx
sar eax, 4
sub ecx, 0
push ebp
mov dword [esp + 0x10], eax
je 0x4025e0
sub ecx, 1
je 0x4024bd
pop ebp
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00431b61
add esp, 0x2c
ret 0xc
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x18]
mov ebp, dword [ebx + 0xc]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
test eax, eax
jle 0x402552
lea edx, [esp + 0x28]
push edx
push esi
mov ecx, ebx
call fcn.00401ee0
mov edx, dword [esp + 0x1c]
xor dword [esp + 0x30], edx
mov edx, dword [esp + 0x20]
xor dword [esp + 0x34], edx
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x2c]
xor ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
xor eax, ebp
mov ebp, dword [esi]
mov dword [esp + 0x18], edx
mov edx, dword [esi + 8]
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], edx
mov edx, dword [esi + 0xc]
mov dword [edi], eax
mov eax, dword [esp + 0x30]
mov dword [edi + 4], ecx
mov dword [edi + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x34]
dec eax
mov dword [edi + 0xc], ecx
add esi, 0x10
add edi, 0x10
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
test eax, eax
jg 0x4024e2
lea edx, [esp + 0x28]
push edx
push esi
mov ecx, ebx
call fcn.00401ee0
mov eax, dword [esp + 0x18]
xor dword [esp + 0x2c], eax
mov eax, dword [esp + 0x34]
xor eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
xor dword [esp + 0x28], ebp
xor dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
shr eax, 0x18
mov esi, eax
lea edx, [esi - 1]
cmp edx, 0xf
ja 0x402631
mov ecx, 0x10
sub ecx, esi
mov eax, ecx
cmp eax, 0x10
jge 0x4025b3
mov edi, edi
movzx edx, byte [esp + eax + 0x28]
cmp edx, esi
jne 0x402631
inc eax
cmp eax, 0x10
jl 0x4025a0
push ecx
lea eax, [esp + 0x2c]
push eax
push edi
call fcn.00431bf0
mov eax, dword [esp + 0x1c]
add esp, 0xc
pop ebp
shl eax, 4
pop edi
sub eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00431b61
add esp, 0x2c
ret 0xc
lea ebp, [eax - 1]
test ebp, ebp
jle 0x4025fb
push edi
push esi
mov ecx, ebx
call fcn.00401ee0
dec ebp
add esi, 0x10
add edi, 0x10
test ebp, ebp
jg 0x4025e7
lea ecx, [esp + 0x28]
push ecx
push esi
mov ecx, ebx
call fcn.00401ee0
movzx esi, byte [esp + 0x37]
cmp esi, 0x10
jge 0x402631
mov ecx, 0x10
sub ecx, esi
mov eax, ecx
cmp eax, 0x10
jge 0x4025b3
movzx edx, byte [esp + eax + 0x28]
cmp edx, esi
jne 0x402631
inc eax
cmp eax, 0x10
jl 0x402620
jmp 0x4025b3
pop ebp
pop edi
pop esi
mov eax, 0xfffffff9
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00431b61
add esp, 0x2c
ret 0xc
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00431b61
add esp, 0x2c
ret 0xc