Function at 0x40f2a0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
cmp byte [0x421494], 0
push ebx
mov ebx, dword [esp + 0x38]
push ebp
push esi
push edi
mov esi, eax
jne 0x40f2bb
call fcn.0040f700
xor eax, eax
mov dword [ebx + 0x104], 0x12
mov ah, byte [esi + 3]
movzx ecx, byte [esi + 1]
movzx edx, byte [esi]
mov al, byte [esi + 2]
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
mov edi, eax
xor eax, eax
mov dword [ebx], edi
mov ah, byte [esi + 7]
movzx ecx, byte [esi + 5]
movzx edx, byte [esi + 4]
mov al, byte [esi + 6]
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
mov ebp, eax
xor eax, eax
mov dword [ebx + 4], ebp
mov ah, byte [esi + 0xb]
movzx ecx, byte [esi + 9]
movzx edx, byte [esi + 8]
mov al, byte [esi + 0xa]
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
xor ecx, ecx
mov dword [ebx + 8], eax
mov ch, byte [esi + 0xf]
movzx edx, byte [esi + 0xc]
mov dword [esp + 0x24], eax
movzx eax, byte [esi + 0xd]
mov cl, byte [esi + 0xe]
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x40]
shl ecx, 8
shr eax, 2
or ecx, edx
cmp eax, 4
mov dword [ebx + 0xc], ecx
mov dword [esp + 0x10], eax
ja 0x40f354
mov eax, 4
add eax, 6
mov dword [ebx + 0x100], eax
xor edx, edx
lea eax, [eax*4 + 3]
div dword [esp + 0x10]
mov edx, dword [esp + 0x40]
cmp edx, 0x10
mov dword [esp + 0x10], eax
je 0x40f678
cmp edx, 0x18
je 0x40f59c
cmp edx, 0x20
je 0x40f3a3
mov eax, dword [esp + 0x44]
pop edi
pop esi
pop ebp
mov dword [eax + 0x100], 0
xor eax, eax
pop ebx
add esp, 0x2c
ret 8
xor eax, eax
mov ah, byte [esi + 0x13]
movzx edx, byte [esi + 0x11]
mov dword [esp + 0x40], 0
mov al, byte [esi + 0x12]
shl eax, 8
or eax, edx
movzx edx, byte [esi + 0x10]
shl eax, 8
or eax, edx
mov edx, dword [esp + 0x44]
mov dword [edx + 0x10], eax
movzx ebx, byte [esi + 0x15]
mov dword [esp + 0x2c], eax
xor eax, eax
mov ah, byte [esi + 0x17]
mov al, byte [esi + 0x16]
shl eax, 8
or eax, ebx
movzx ebx, byte [esi + 0x14]
shl eax, 8
or eax, ebx
mov dword [edx + 0x14], eax
movzx ebx, byte [esi + 0x19]
mov dword [esp + 0x30], eax
xor eax, eax
mov ah, byte [esi + 0x1b]
mov al, byte [esi + 0x1a]
shl eax, 8
or eax, ebx
movzx ebx, byte [esi + 0x18]
shl eax, 8
or eax, ebx
xor ebx, ebx
mov dword [edx + 0x18], eax
mov bh, byte [esi + 0x1f]
mov dword [esp + 0x34], eax
movzx eax, byte [esi + 0x1d]
mov bl, byte [esi + 0x1e]
shl ebx, 8
or ebx, eax
movzx eax, byte [esi + 0x1c]
shl ebx, 8
or ebx, eax
cmp dword [esp + 0x10], 0
mov dword [edx + 0x1c], ebx
jbe 0x40f528
add edx, 0x24
lea ecx, [ecx]
mov dword [esp + 0x14], ecx
mov ecx, ebx
mov eax, ebx
shr eax, 0x18
mov eax, dword [eax*4 + 0x424200]
shr ecx, 0x10
movzx esi, cl
xor eax, dword [esi*4 + 0x423e00]
mov ecx, ebx
shr ecx, 8
movzx esi, cl
xor eax, dword [esi*4 + 0x423a00]
mov ecx, dword [esp + 0x14]
movzx esi, bl
xor eax, dword [esi*4 + 0x424600]
mov esi, dword [esp + 0x40]
xor eax, dword [esi*4 + 0x423980]
mov dword [esp + 0x18], ebx
xor edi, eax
mov eax, dword [esp + 0x24]
xor ebp, edi
xor eax, ebp
xor ecx, eax
mov dword [edx + 4], eax
mov dword [esp + 0x24], eax
mov ebx, ecx
shr ebx, 0x10
movzx esi, bl
mov dword [edx - 4], edi
mov dword [edx], ebp
mov dword [edx + 8], ecx
mov eax, ecx
shr eax, 0x18
mov eax, dword [eax*4 + 0x424600]
xor eax, dword [esi*4 + 0x424200]
mov ebx, ecx
shr ebx, 8
movzx esi, bl
xor eax, dword [esi*4 + 0x423e00]
mov ebx, dword [esp + 0x18]
movzx esi, cl
xor eax, dword [esi*4 + 0x423a00]
add edx, 0x20
mov esi, eax
mov eax, dword [esp + 0x2c]
xor eax, esi
mov esi, dword [esp + 0x30]
xor esi, eax
mov dword [edx - 0x14], eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x34]
xor eax, esi
xor ebx, eax
mov dword [edx - 0xc], eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x40]
add eax, 1
cmp eax, dword [esp + 0x10]
mov dword [edx - 0x10], esi
mov dword [edx - 8], ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x40], eax
jb 0x40f440
mov edx, dword [esp + 0x44]
mov ecx, dword [edx + 0x100]
add ecx, ecx
mov eax, 4
add ecx, ecx
cmp ecx, eax
jbe 0x40f58d
jmp 0x40f540
mov esi, dword [edx + eax*4]
mov ebx, esi
shr ebx, 0x10
mov ecx, esi
shr ecx, 0x18
mov ecx, dword [ecx*4 + 0x426600]
movzx edi, bl
xor ecx, dword [edi*4 + 0x426200]
mov ebx, esi
shr ebx, 8
movzx esi, bl
xor ecx, dword [esi*4 + 0x425e00]
movzx esi, byte [edx + eax*4]
xor ecx, dword [esi*4 + 0x425a00]
add eax, 1
mov dword [edx + eax*4 - 4], ecx
mov ecx, dword [edx + 0x100]
add ecx, ecx
add ecx, ecx
cmp eax, ecx
jb 0x40f540
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2c
ret 8
movzx edx, byte [esi + 0x11]
xor eax, eax
mov ah, byte [esi + 0x13]
xor ebx, ebx
mov dword [esp + 0x40], 0
mov al, byte [esi + 0x12]
shl eax, 8
or eax, edx
movzx edx, byte [esi + 0x10]
shl eax, 8
or eax, edx
mov edx, dword [esp + 0x44]
mov dword [edx + 0x10], eax
mov bh, byte [esi + 0x17]
mov dword [esp + 0x2c], eax
movzx eax, byte [esi + 0x15]
mov bl, byte [esi + 0x16]
shl ebx, 8
or ebx, eax
movzx eax, byte [esi + 0x14]
shl ebx, 8
or ebx, eax
cmp dword [esp + 0x10], 0
mov dword [edx + 0x14], ebx
jbe 0x40f528
lea esi, [edx + 0x1c]
mov eax, ebx
shr eax, 0x10
movzx eax, al
mov edx, ebx
shr edx, 0x18
mov edx, dword [edx*4 + 0x424200]
xor edx, dword [eax*4 + 0x423e00]
mov eax, ebx
shr eax, 8
movzx eax, al
xor edx, dword [eax*4 + 0x423a00]
movzx eax, bl
xor edx, dword [eax*4 + 0x424600]
add esi, 0x18
mov eax, edx
mov edx, dword [esp + 0x40]
xor eax, dword [edx*4 + 0x423980]
add edx, 1
xor edi, eax
mov eax, dword [esp + 0x24]
xor ebp, edi
xor eax, ebp
xor ecx, eax
mov dword [esi - 0x14], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
xor eax, ecx
xor ebx, eax
cmp edx, dword [esp + 0x10]
mov dword [esi - 0x1c], edi
mov dword [esi - 0x18], ebp
mov dword [esi - 0x10], ecx
mov dword [esi - 0xc], eax
mov dword [esi - 8], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x40], edx
jb 0x40f5f4
jmp 0x40f524
test eax, eax
mov dword [esp + 0x40], 0
jbe 0x40f524
mov edx, dword [esp + 0x44]
lea esi, [edx + 0x14]
nop
mov ebx, ecx
shr ebx, 0x10
movzx ebx, bl
mov eax, ecx
shr eax, 0x18
mov eax, dword [eax*4 + 0x424200]
xor eax, dword [ebx*4 + 0x423e00]
mov ebx, ecx
shr ebx, 8
movzx ebx, bl
xor eax, dword [ebx*4 + 0x423a00]
movzx ebx, cl
xor eax, dword [ebx*4 + 0x424600]
mov ebx, dword [esp + 0x40]
xor eax, dword [ebx*4 + 0x423980]
add ebx, 1
xor edi, eax
mov eax, dword [esp + 0x24]
xor ebp, edi
xor eax, ebp
xor ecx, eax
mov dword [esi - 4], edi
mov dword [esi], ebp
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
add esi, 0x10
cmp ebx, dword [esp + 0x10]
mov dword [esp + 0x24], eax
mov dword [esp + 0x40], ebx
jb 0x40f690
jmp 0x40f528