Function at 0x406830
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x108
mov esi, dword [esp + 0x11c]
lea eax, [esi + 0x8f12]
push 0x90
push 8
push eax
call fcn.004084e0
add esp, 0xc
lea eax, [esi + 0x8fa2]
push 0x70
push 9
push eax
call fcn.004084e0
add esp, 0xc
mov dword [esi + 0x9012], 0x7070707
mov dword [esi + 0x9016], 0x7070707
mov dword [esi + 0x901a], 0x7070707
mov dword [esi + 0x901e], 0x7070707
mov dword [esi + 0x9022], 0x7070707
mov dword [esi + 0x9026], 0x7070707
mov dword [esi + 0x902e], 0x8080808
mov dword [esi + 0x902a], 0x8080808
mov dword [esi + 0x9032], 0x5050505
mov dword [esi + 0x9036], 0x5050505
mov dword [esi + 0x903a], 0x5050505
mov dword [esi + 0x903e], 0x5050505
mov dword [esi + 0x9042], 0x5050505
mov dword [esi + 0x9046], 0x5050505
mov dword [esi + 0x904a], 0x5050505
mov dword [esi + 0x904e], 0x5050505
mov eax, esp
push 0x84
push 0
push eax
call fcn.004084e0
add esp, 0xc
xor eax, eax
nop
nop
movzx ecx, byte [esi + eax + 0x8f12]
mov edx, dword [esp + ecx*4]
mov ebx, edx
and ebx, 1
xor edx, 1
lea edx, [edx + ebx*2]
mov dword [esp + ecx*4], edx
movzx ecx, byte [esi + eax + 0x8f13]
mov edx, dword [esp + ecx*4]
mov ebx, edx
and ebx, 1
xor edx, 1
lea edx, [edx + ebx*2]
mov dword [esp + ecx*4], edx
add eax, 2
cmp eax, 0x120
jne 0x406920
mov dword [esp + 0x88], 0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
add eax, eax
mov dword [esp + 0x8c], eax
mov edx, ecx
and edx, eax
xor eax, ecx
add eax, eax
lea eax, [eax + edx*4]
mov dword [esp + 0x90], eax
mov ecx, dword [esp + 0xc]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0x94], eax
mov ecx, dword [esp + 0x10]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0x98], eax
mov ecx, dword [esp + 0x14]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0x9c], eax
mov ecx, dword [esp + 0x18]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xa0], eax
mov ecx, dword [esp + 0x1c]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xa4], eax
mov ecx, dword [esp + 0x20]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xa8], eax
mov ecx, dword [esp + 0x24]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea ecx, [ecx + edx*4]
mov dword [esp + 0xac], ecx
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov ebx, edx
and ebx, ecx
xor edx, ecx
add edx, edx
lea ecx, [edx + ebx*4]
mov dword [esp + 0xb0], ecx
mov edx, eax
and edx, ecx
xor eax, ecx
add eax, eax
lea eax, [eax + edx*4]
mov dword [esp + 0xb4], eax
mov ecx, dword [esp + 0x30]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xb8], eax
mov ecx, dword [esp + 0x34]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xbc], eax
mov ecx, dword [esp + 0x38]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xc0], eax
xor eax, eax
jmp 0x406ab4
mov word [esi + eax*2 + 0x8852], bx
inc eax
cmp eax, 0x120
je 0x406b32
movzx ecx, byte [esi + eax + 0x8f12]
test ecx, ecx
je 0x406aa8
mov edi, dword [esp + ecx*4 + 0x84]
lea ebx, [edi + 1]
mov dword [esp + ecx*4 + 0x84], ebx
xor ebx, ebx
cmp cl, 4
jb 0x406b0f
mov ebp, ecx
and ebp, 0xfffffffc
xor ebx, ebx
nop
mov edx, edi
and edx, 1
shl edx, 2
lea edx, [edx + ebx*8]
mov ebx, edi
and ebx, 2
or ebx, edx
mov edx, edi
shr edx, 2
and edx, 1
or edx, ebx
mov ebx, edi
shr ebx, 3
and ebx, 1
lea ebx, [ebx + edx*2]
shr edi, 4
add ebp, 0xfffffffc
jne 0x406ae0
and ecx, 3
je 0x406aa0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, edi
and edx, 1
lea ebx, [edx + ebx*2]
shr edi, 1
dec ecx
jne 0x406b20
jmp 0x406aa0
push 0x84
push 0
lea eax, [esp + 8]
push eax
call fcn.004084e0
add esp, 0xc
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esi + eax + 0x9032]
mov edx, dword [esp + ecx*4]
mov edi, edx
and edi, 1
xor edx, 1
lea edx, [edx + edi*2]
mov dword [esp + ecx*4], edx
movzx ecx, byte [esi + eax + 0x9033]
mov edx, dword [esp + ecx*4]
mov edi, edx
and edi, 1
xor edx, 1
lea edx, [edx + edi*2]
mov dword [esp + ecx*4], edx
add eax, 2
cmp eax, 0x20
jne 0x406b50
mov dword [esp + 0x88], 0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
add eax, eax
mov dword [esp + 0x8c], eax
mov edx, ecx
and edx, eax
xor eax, ecx
add eax, eax
lea eax, [eax + edx*4]
mov dword [esp + 0x90], eax
mov ecx, dword [esp + 0xc]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0x94], eax
mov ecx, dword [esp + 0x10]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0x98], eax
mov ecx, dword [esp + 0x14]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0x9c], eax
mov ecx, dword [esp + 0x18]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xa0], eax
mov ecx, dword [esp + 0x1c]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xa4], eax
mov ecx, dword [esp + 0x20]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xa8], eax
mov ecx, dword [esp + 0x24]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea ecx, [ecx + edx*4]
mov dword [esp + 0xac], ecx
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov edi, edx
and edi, ecx
xor edx, ecx
add edx, edx
lea ecx, [edx + edi*4]
mov dword [esp + 0xb0], ecx
mov edx, eax
and edx, ecx
xor eax, ecx
add eax, eax
lea eax, [eax + edx*4]
mov dword [esp + 0xb4], eax
mov ecx, dword [esp + 0x30]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xb8], eax
mov ecx, dword [esp + 0x34]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xbc], eax
mov ecx, dword [esp + 0x38]
mov edx, ecx
and edx, eax
xor ecx, eax
add ecx, ecx
lea eax, [ecx + edx*4]
mov dword [esp + 0xc0], eax
xor eax, eax
jmp 0x406ce2
mov word [esi + eax*2 + 0x8a92], di
inc eax
cmp eax, 0x20
je 0x406d62
movzx ecx, byte [esi + eax + 0x9032]
test ecx, ecx
je 0x406cd8
mov edx, dword [esp + ecx*4 + 0x84]
lea edi, [edx + 1]
mov dword [esp + ecx*4 + 0x84], edi
xor edi, edi
cmp cl, 4
jb 0x406d4b
mov ebx, ecx
and ebx, 0xfffffffc
xor edi, edi
nop
nop
nop
mov ebp, edx
and ebp, 1
shl ebp, 2
lea edi, [edi*8]
add edi, ebp
mov ebp, edx
and ebp, 2
or ebp, edi
mov edi, edx
shr edi, 2
and edi, 1
or edi, ebp
mov ebp, edx
shr ebp, 3
and ebp, 1
lea edi, [edi*2]
add edi, ebp
shr edx, 4
add ebx, 0xfffffffc
jne 0x406d10
and ecx, 3
je 0x406cd0
mov ebx, edx
and ebx, 1
lea edi, [ebx + edi*2]
shr edx, 1
dec ecx
jne 0x406d50
jmp 0x406cd0
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
bts eax, ecx
mov dword [esi + 0x48], eax
add ecx, 2
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x406da1
add esp, 0x108
pop esi
pop edi
pop ebx
pop ebp
ret
shr eax, 8
mov dword [esi + 0x48], eax
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x406d79
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x406d90
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x406d90