Function at 0x40f433
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
cmp byte [0x421474], 0
push ebx
push esi
mov esi, eax
jne 0x40f44b
call fcn.0040f827
xor eax, eax
mov dword [edi + 0x104], 0x12
mov ah, byte [esi + 3]
movzx ecx, byte [esi + 1]
xor ebx, ebx
push 4
mov al, byte [esi + 2]
shl eax, 8
or eax, ecx
movzx ecx, byte [esi]
shl eax, 8
or eax, ecx
mov dword [edi], eax
movzx ecx, byte [esi + 5]
mov dword [ebp - 0x28], eax
xor eax, eax
mov ah, byte [esi + 7]
mov al, byte [esi + 6]
shl eax, 8
or eax, ecx
movzx ecx, byte [esi + 4]
shl eax, 8
or eax, ecx
mov dword [edi + 4], eax
movzx ecx, byte [esi + 9]
mov dword [ebp - 0x24], eax
xor eax, eax
mov ah, byte [esi + 0xb]
mov al, byte [esi + 0xa]
shl eax, 8
or eax, ecx
movzx ecx, byte [esi + 8]
shl eax, 8
or eax, ecx
mov ecx, dword [ebp + 8]
mov dword [edi + 8], eax
mov bh, byte [esi + 0xf]
mov dword [ebp - 0x20], eax
movzx eax, byte [esi + 0xd]
shr ecx, 2
mov bl, byte [esi + 0xe]
shl ebx, 8
or ebx, eax
movzx eax, byte [esi + 0xc]
shl ebx, 8
or ebx, eax
pop eax
cmp ecx, eax
mov dword [edi + 0xc], ebx
jbe 0x40f4df
mov eax, ecx
add eax, 6
mov dword [edi + 0x100], eax
xor edx, edx
lea eax, [eax*4 + 3]
div ecx
cmp dword [ebp + 8], 0x10
mov dword [ebp - 4], eax
je 0x40f758
cmp dword [ebp + 8], 0x18
je 0x40f684
cmp dword [ebp + 8], 0x20
je 0x40f51e
and dword [edi + 0x100], 0
xor eax, eax
jmp 0x40f821
xor ecx, ecx
mov ch, byte [esi + 0x13]
movzx edx, byte [esi + 0x11]
and dword [ebp + 8], 0
mov cl, byte [esi + 0x12]
shl ecx, 8
or ecx, edx
movzx edx, byte [esi + 0x10]
shl ecx, 8
or ecx, edx
mov dword [edi + 0x10], ecx
movzx edx, byte [esi + 0x15]
mov dword [ebp - 0x18], ecx
xor ecx, ecx
mov ch, byte [esi + 0x17]
mov cl, byte [esi + 0x16]
shl ecx, 8
or ecx, edx
movzx edx, byte [esi + 0x14]
shl ecx, 8
or ecx, edx
mov dword [edi + 0x14], ecx
movzx edx, byte [esi + 0x19]
mov dword [ebp - 0x14], ecx
xor ecx, ecx
mov ch, byte [esi + 0x1b]
mov cl, byte [esi + 0x1a]
shl ecx, 8
or ecx, edx
movzx edx, byte [esi + 0x18]
shl ecx, 8
or ecx, edx
xor edx, edx
mov dword [edi + 0x18], ecx
mov dh, byte [esi + 0x1f]
mov dword [ebp - 0x10], ecx
movzx ecx, byte [esi + 0x1d]
mov dl, byte [esi + 0x1e]
shl edx, 8
or edx, ecx
movzx ecx, byte [esi + 0x1c]
shl edx, 8
or edx, ecx
test eax, eax
mov dword [edi + 0x1c], edx
jbe 0x40f7c7
lea ecx, [edi + 0x24]
mov dword [ebp - 8], ebx
mov ebx, edx
mov eax, edx
shr eax, 0x18
mov eax, dword [eax*4 + 0x4241e0]
shr ebx, 0x10
movzx esi, bl
xor eax, dword [esi*4 + 0x423de0]
mov ebx, edx
shr ebx, 8
movzx esi, bl
xor eax, dword [esi*4 + 0x4239e0]
mov ebx, dword [ebp - 8]
movzx esi, dl
xor eax, dword [esi*4 + 0x4245e0]
mov esi, dword [ebp + 8]
xor eax, dword [esi*4 + 0x423960]
mov dword [ebp - 8], edx
xor dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ecx - 4], eax
mov eax, dword [ebp - 0x24]
xor eax, dword [ebp - 0x28]
xor dword [ebp - 0x20], eax
mov dword [ecx], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
xor ebx, eax
mov dword [ecx + 4], eax
mov edx, ebx
shr edx, 0x10
movzx esi, dl
mov dword [ecx + 8], ebx
mov eax, ebx
shr eax, 0x18
mov eax, dword [eax*4 + 0x4245e0]
xor eax, dword [esi*4 + 0x4241e0]
mov edx, ebx
shr edx, 8
movzx esi, dl
xor eax, dword [esi*4 + 0x423de0]
mov edx, dword [ebp - 8]
movzx esi, bl
xor eax, dword [esi*4 + 0x4239e0]
add ecx, 0x20
xor dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [ecx - 0x14], eax
mov eax, dword [ebp - 0x14]
xor eax, dword [ebp - 0x18]
xor dword [ebp - 0x10], eax
mov dword [ecx - 0x10], eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
xor edx, eax
inc dword [ebp + 8]
mov dword [ecx - 0xc], eax
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 4]
mov dword [ecx - 8], edx
jb 0x40f5aa
jmp 0x40f7c7
movzx edx, byte [esi + 0x11]
xor ecx, ecx
mov ch, byte [esi + 0x13]
and dword [ebp + 8], 0
mov cl, byte [esi + 0x12]
shl ecx, 8
or ecx, edx
movzx edx, byte [esi + 0x10]
shl ecx, 8
or ecx, edx
xor edx, edx
mov dword [edi + 0x10], ecx
mov dh, byte [esi + 0x17]
mov dword [ebp - 0x18], ecx
movzx ecx, byte [esi + 0x15]
mov dl, byte [esi + 0x16]
shl edx, 8
or edx, ecx
movzx ecx, byte [esi + 0x14]
shl edx, 8
or edx, ecx
test eax, eax
mov dword [edi + 0x14], edx
jbe 0x40f7c7
lea ecx, [edi + 0x1c]
mov dword [ebp - 8], ebx
mov ebx, edx
shr ebx, 0x10
movzx esi, bl
mov eax, edx
shr eax, 0x18
mov eax, dword [eax*4 + 0x4241e0]
xor eax, dword [esi*4 + 0x423de0]
mov ebx, edx
shr ebx, 8
movzx esi, bl
xor eax, dword [esi*4 + 0x4239e0]
mov ebx, dword [ebp - 8]
movzx esi, dl
xor eax, dword [esi*4 + 0x4245e0]
mov esi, dword [ebp + 8]
xor eax, dword [esi*4 + 0x423960]
xor dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ecx - 4], eax
mov eax, dword [ebp - 0x24]
xor eax, dword [ebp - 0x28]
xor dword [ebp - 0x20], eax
mov dword [ecx], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
xor ebx, eax
xor dword [ebp - 0x18], ebx
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x18]
xor edx, eax
inc dword [ebp + 8]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [ecx + 8], ebx
mov dword [ecx + 0x10], edx
add ecx, 0x18
cmp eax, dword [ebp - 4]
jb 0x40f6d0
jmp 0x40f7c7
xor esi, esi
test eax, eax
jbe 0x40f7c7
lea ecx, [edi + 0x14]
mov edx, ebx
shr edx, 0x10
movzx edx, dl
mov eax, ebx
shr eax, 0x18
mov eax, dword [eax*4 + 0x4241e0]
xor eax, dword [edx*4 + 0x423de0]
mov edx, ebx
shr edx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x4239e0]
movzx edx, bl
xor eax, dword [edx*4 + 0x4245e0]
xor eax, dword [esi*4 + 0x423960]
xor dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ecx - 4], eax
mov eax, dword [ebp - 0x24]
xor eax, dword [ebp - 0x28]
xor dword [ebp - 0x20], eax
mov dword [ecx], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
xor ebx, eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], ebx
inc esi
add ecx, 0x10
cmp esi, dword [ebp - 4]
jb 0x40f761
mov eax, dword [edi + 0x100]
push 4
pop ecx
shl eax, 2
cmp eax, ecx
jbe 0x40f81e
mov eax, dword [edi + ecx*4]
mov ebx, eax
mov edx, eax
shr edx, 0x18
mov edx, dword [edx*4 + 0x4265e0]
shr ebx, 0x10
shr eax, 8
movzx esi, bl
xor edx, dword [esi*4 + 0x4261e0]
movzx eax, al
xor edx, dword [eax*4 + 0x425de0]
movzx eax, byte [edi + ecx*4]
xor edx, dword [eax*4 + 0x4259e0]
mov dword [edi + ecx*4], edx
mov eax, dword [edi + 0x100]
inc ecx
shl eax, 2
cmp ecx, eax
jb 0x40f7d7
xor eax, eax
inc eax
pop esi
pop ebx
leave
ret 4