Function at 0x10046290
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x44
mov edx, dword [ebp + 8]
mov eax, dword [0x1008e00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x34], ecx
mov eax, dword [ecx + 0x44]
mov dword [ebp - 0x14], eax
mov eax, dword [edx]
test eax, eax
je 0x100462d2
mov ecx, dword [edx + 4]
xor edx, edx
xor ebx, ebx
movzx esi, byte [ecx + edx]
rol ebx, 5
xor ebx, esi
imul ebx, ebx, 0x9e3779b9
inc edx
cmp eax, edx
jne 0x100462bc
jmp 0x100462d4
xor ebx, ebx
mov ecx, dword [ebp - 0x34]
lea edx, [ecx + 0x38]
imul edi, ebx, 0x9e3779b9
lea eax, [edi - 2]
cmp edi, 2
cmovb edi, eax
mov dword [ebp - 0x18], ebx
and edi, 0xfffffffe
mov esi, dword [ecx + 0x40]
test esi, esi
mov dword [ebp - 0x50], edx
je 0x10046444
mov ecx, dword [edx + 4]
shr ecx, 0x18
mov dword [ebp - 0x28], edi
shr edi, cl
mov dword [ebp - 0x2c], ecx
neg ecx
xor eax, eax
inc eax
shl eax, cl
lea ecx, [esi + eax*4]
mov dword [ebp - 0x40], esi
lea eax, [esi + edi*4]
lea esi, [ecx + edi*8]
mov edx, dword [eax]
test edx, edx
je 0x10046334
mov ecx, edx
and ecx, 0xfffffffe
cmp ecx, dword [ebp - 0x28]
jne 0x10046364
mov ecx, esi
cmp dword [esi], ebx
jne 0x10046364
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x1c], ecx
cmp dword [eax], 2
jb 0x1004644f
add esi, 4
mov esi, dword [esi]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10039ea0
mov eax, esi
add esp, 0x44
pop esi
pop edi
pop ebx
pop ebp
ret 4
mov ecx, 0x20
sub ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x30], ecx
mov ebx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
shl ebx, cl
mov ecx, dword [ebp - 0x2c]
shr ebx, cl
xor ecx, ecx
dec ecx
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x30]
shl dword [ebp - 0x3c], cl
or ebx, 1
mov dword [ebp - 0x30], ebx
not dword [ebp - 0x3c]
mov dword [ebp - 0x44], 0
xor ebx, ebx
mov ecx, ebx
mov bl, 1
test cl, cl
je 0x100463f0
mov dword [ebp - 0x38], 0
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x2c]
sub edi, dword [ebp - 0x30]
and edi, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], eax
mov ecx, eax
neg cl
xor eax, eax
inc eax
shl eax, cl
test edx, edx
cmove eax, edx
lea ecx, [edx + eax*4]
mov dword [ebp - 0x40], edx
lea eax, [edx + edi*4]
lea esi, [ecx + edi*8]
mov edx, dword [eax]
test edx, edx
je 0x10046411
mov ecx, edx
and ecx, 0xfffffffe
cmp ecx, dword [ebp - 0x28]
jne 0x1004639a
mov ecx, esi
mov ecx, dword [esi]
cmp ecx, dword [ebp - 0x18]
jne 0x1004639a
jmp 0x10046334
cmp edx, 1
je 0x10046483
or edx, 1
mov dword [eax], edx
mov eax, dword [ebp - 0x34]
mov edx, dword [eax + 0x40]
movzx eax, byte [eax + 0x3f]
mov cl, 1
mov dword [ebp - 0x38], ecx
xor ebx, ebx
jmp 0x100463af
mov edx, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x48]
shld edi, edx, 8
shl edx, 8
movzx ecx, byte [ebp - 0x44]
or ecx, edx
cmp byte [ebp - 0x38], 0
cmove eax, edi
cmove esi, ecx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x1c], ecx
test esi, esi
jne 0x10046340
jmp 0x1004644f
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edi
lea edi, [ebp - 0x14]
lea eax, [ebp - 0x18]
lea edx, [ebp - 0x24]
mov ecx, dword [ebp - 0x50]
mov esi, edi
push edi
push eax
call fcn.1005fe60
add esp, 8
test al, al
je 0x100464a3
mov ecx, dword [ebp - 0x34]
add ecx, 4
push dword [ebp + 8]
push 0x1007d734
call fcn.1000d6b0
jmp 0x1004634c
mov ecx, esi
mov edx, esi
shrd edx, eax, 8
mov dword [ebp - 0x4c], edx
shr eax, 8
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ecx
jmp 0x100463a9
mov dword [0x1008f8f4], 0x10082cc1
int3