Function at 0x4381d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x94
mov eax, dword [0x490018]
xor eax, esp
mov dword [esp + 0x90], eax
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x14]
mov eax, edx
push esi
mov esi, dword [ebp + 8]
shr eax, 4
push edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x438472
test ecx, ecx
je 0x438472
mov edi, dword [ebp + 0xc]
test edx, edx
jbe 0x43822d
test esi, esi
je 0x438472
test edi, edi
je 0x438472
cmp eax, 4
jb 0x4383cb
shr eax, 2
mov dword [esp + 0xc], eax
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov ecx, 0x10
lea ecx, [ecx]
mov al, byte [ebx + ecx - 1]
dec ecx
add al, 1
mov byte [ebx + ecx], al
jne 0x438270
test ecx, ecx
jne 0x438260
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov eax, dword [ebx + 8]
mov dword [esp + 0x28], ecx
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
mov ecx, 0x10
mov al, byte [ebx + ecx - 1]
dec ecx
add al, 1
mov byte [ebx + ecx], al
jne 0x4382a0
test ecx, ecx
jne 0x438290
mov edx, dword [ebx]
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 4]
mov dword [esp + 0x38], edx
mov edx, dword [ebx + 0xc]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], edx
mov ecx, 0x10
mov al, byte [ebx + ecx - 1]
dec ecx
add al, 1
mov byte [ebx + ecx], al
jne 0x4382d0
test ecx, ecx
jne 0x4382c0
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov dword [esp + 0x48], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], eax
mov ecx, 0x10
mov al, byte [ebx + ecx - 1]
dec ecx
add al, 1
mov byte [ebx + ecx], al
jne 0x438300
test ecx, ecx
jne 0x4382f0
mov ecx, dword [esp + 0x10]
push ecx
lea ecx, [esp + 0x1c]
mov edx, ecx
call fcn.00435fe0
mov edx, dword [edi]
xor edx, dword [esp + 0x1c]
sub dword [esp + 0x18], 4
mov dword [esi], edx
mov eax, dword [edi + 4]
xor eax, dword [esp + 0x20]
add esp, 4
mov dword [esi + 4], eax
mov ecx, dword [edi + 8]
xor ecx, dword [esp + 0x20]
add edi, 0x40
mov dword [esi + 8], ecx
mov edx, dword [edi - 0x34]
xor edx, dword [esp + 0x24]
add esi, 0x40
mov dword [esi - 0x34], edx
mov eax, dword [edi - 0x30]
xor eax, dword [esp + 0x28]
mov dword [esi - 0x30], eax
mov ecx, dword [edi - 0x2c]
xor ecx, dword [esp + 0x2c]
mov dword [esi - 0x2c], ecx
mov edx, dword [edi - 0x28]
xor edx, dword [esp + 0x30]
mov dword [esi - 0x28], edx
mov eax, dword [edi - 0x24]
xor eax, dword [esp + 0x34]
mov dword [esi - 0x24], eax
mov ecx, dword [edi - 0x20]
xor ecx, dword [esp + 0x38]
mov dword [esi - 0x20], ecx
mov edx, dword [edi - 0x1c]
xor edx, dword [esp + 0x3c]
mov dword [esi - 0x1c], edx
mov eax, dword [edi - 0x18]
xor eax, dword [esp + 0x40]
mov dword [esi - 0x18], eax
mov ecx, dword [edi - 0x14]
xor ecx, dword [esp + 0x44]
mov dword [esi - 0x14], ecx
mov edx, dword [edi - 0x10]
xor edx, dword [esp + 0x48]
mov dword [esi - 0x10], edx
mov eax, dword [edi - 0xc]
xor eax, dword [esp + 0x4c]
mov dword [esi - 0xc], eax
mov ecx, dword [edi - 8]
xor ecx, dword [esp + 0x50]
mov dword [esi - 8], ecx
mov edx, dword [edi - 4]
xor edx, dword [esp + 0x54]
sub dword [esp + 0xc], 1
mov dword [esi - 4], edx
jne 0x43823d
mov eax, dword [esp + 0x14]
cmp eax, 1
jb 0x438430
mov dword [esp + 0xc], eax
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
mov ecx, ebx
call fcn.0042f060
mov ecx, dword [edi]
xor ecx, dword [esp + 0x1c]
add esp, 4
mov dword [esi], ecx
mov edx, dword [edi + 4]
xor edx, dword [esp + 0x1c]
mov dword [esi + 4], edx
mov eax, dword [edi + 8]
xor eax, dword [esp + 0x20]
mov dword [esi + 8], eax
mov ecx, dword [edi + 0xc]
xor ecx, dword [esp + 0x24]
mov eax, 0x10
mov dword [esi + 0xc], ecx
mov cl, byte [eax + ebx - 1]
dec eax
add cl, 1
mov byte [eax + ebx], cl
jne 0x438423
test eax, eax
jne 0x438412
add edi, 0x10
add esi, 0x10
sub dword [esp + 0xc], 1
jne 0x4383d4
mov eax, dword [ebp + 0x10]
and eax, 0xf
mov dword [esp + 0xc], eax
je 0x438472
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
mov ecx, ebx
call fcn.0042f060
mov edx, dword [esp + 0x10]
add esp, 4
xor ecx, ecx
test edx, edx
jbe 0x438472
lea eax, [esp + 0x18]
sub edi, eax
sub esi, eax
lea eax, [esp + ecx + 0x18]
mov bl, byte [eax + edi]
xor bl, byte [eax]
inc ecx
mov byte [eax + esi], bl
cmp ecx, edx
jb 0x438461
mov ecx, dword [esp + 0x9c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00428cb4
mov esp, ebp
pop ebp
ret