Function at 0x10006310
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
push ebx
push esi
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push edi
push eax
mov ebx, dword [esi + 0x130]
push esi
mov dword [esp + 0x18], ebx
call fcn.100061f0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jl 0x100067b2
push ebp
mov ebp, dword [esi + 0x130]
cmp eax, 8
mov dword [esp + 0x10], eax
jl 0x1000661d
mov eax, 8
mov ecx, dword [ebp + 0x7d10]
test ecx, ecx
jne 0x1000640e
mov ebx, dword [ebp + 0x7d0c]
mov dword [ebp + 0x7d10], 8
inc ebx
mov esi, dword [ebp + 0x7d08]
mov dword [ebp + 0x7d0c], ebx
mov ecx, dword [ebp + 0x13088]
lea ecx, [ecx + ecx*2]
shl ecx, 4
lea edx, [ecx + ebp]
mov ecx, dword [ecx + ebp + 0x10084]
cmp ecx, esi
jne 0x100063fe
mov edi, dword [ebp + 0x7d00]
mov ecx, dword [ebp + 0xdc00]
lea esi, [edx + 0x1008c]
mov edx, ebx
add edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0xdc00]
mov edx, dword [ebp + 0x7d0c]
mov edi, dword [ebp + 0x7d08]
add edx, ecx
mov dword [ebp + 0x7d0c], edx
mov edx, dword [ebp + 0xdc00]
shl edx, 3
add edi, edx
mov dword [ebp + 0x7d08], edi
mov ecx, dword [ebp + 0x13088]
inc ecx
and ecx, 0xff
mov dword [ebp + 0x13088], ecx
mov edx, dword [ebp + 0x7d00]
mov ecx, dword [ebp + 0x7d0c]
mov byte [edx + ecx], 0
mov edx, dword [ebp + 0x7d10]
cmp eax, edx
jge 0x1000641a
mov edx, eax
mov ebx, dword [ebp + 0x7d10]
mov ecx, dword [ebp + 0x7d00]
mov esi, dword [ebp + 0x7d0c]
sub ebx, edx
sub eax, edx
mov dword [ebp + 0x7d10], ebx
mov edi, ebx
add esi, ecx
mov ebx, 0x4c
mov ecx, eax
sar ebx, cl
mov ecx, edi
shl bl, cl
mov cl, byte [esi]
or cl, bl
mov byte [esi], cl
mov esi, dword [ebp + 0x7d08]
add esi, edx
test eax, eax
mov dword [ebp + 0x7d08], esi
jg 0x10006357
mov edx, dword [esp + 0x18]
lea eax, [edx - 8]
cmp eax, 8
mov dword [esp + 0x10], eax
jl 0x10006615
mov esi, 8
mov eax, dword [ebp + 0x7d10]
test eax, eax
jne 0x100064d3
mov edx, dword [ebp + 0x7d0c]
mov dword [ebp + 0x7d10], 8
inc edx
mov dword [ebp + 0x7d0c], edx
mov eax, dword [ebp + 0x13088]
lea eax, [eax + eax*2]
shl eax, 4
mov ecx, dword [eax + ebp + 0x10084]
mov eax, dword [ebp + 0x7d08]
cmp ecx, eax
jne 0x100064c3
push ebp
call fcn.100060d0
add esp, 4
mov edx, dword [ebp + 0x7d00]
mov eax, dword [ebp + 0x7d0c]
mov byte [edx + eax], 0
mov eax, dword [ebp + 0x7d10]
cmp esi, eax
jge 0x100064df
mov eax, esi
mov edi, dword [ebp + 0x7d10]
mov ecx, dword [ebp + 0x7d00]
sub edi, eax
sub esi, eax
mov dword [ebp + 0x7d10], edi
mov edx, edi
mov edi, dword [ebp + 0x7d0c]
mov ebx, 0x41
add edi, ecx
mov ecx, esi
sar ebx, cl
mov ecx, edx
mov dl, byte [edi]
shl bl, cl
or dl, bl
mov byte [edi], dl
mov ecx, dword [ebp + 0x7d08]
add ecx, eax
test esi, esi
mov dword [ebp + 0x7d08], ecx
jg 0x1000647c
mov eax, dword [esp + 0x10]
sub eax, 8
cmp eax, 8
mov dword [esp + 0x10], eax
jl 0x10006615
mov esi, 8
mov eax, dword [ebp + 0x7d10]
test eax, eax
jne 0x10006598
mov ebx, dword [ebp + 0x7d0c]
mov dword [ebp + 0x7d10], 8
inc ebx
mov ecx, dword [ebp + 0x7d08]
mov dword [ebp + 0x7d0c], ebx
mov eax, dword [ebp + 0x13088]
lea edx, [eax + eax*2]
shl edx, 4
mov eax, dword [edx + ebp + 0x10084]
cmp eax, ecx
jne 0x10006588
push ebp
call fcn.100060d0
add esp, 4
mov ecx, dword [ebp + 0x7d0c]
mov edx, dword [ebp + 0x7d00]
mov byte [ecx + edx], 0
mov eax, dword [ebp + 0x7d10]
cmp esi, eax
jge 0x100065a4
mov eax, esi
mov edi, dword [ebp + 0x7d10]
mov ecx, dword [ebp + 0x7d0c]
sub edi, eax
sub esi, eax
mov dword [ebp + 0x7d10], edi
mov edx, edi
mov edi, dword [ebp + 0x7d00]
mov ebx, 0x4d
add edi, ecx
mov ecx, esi
sar ebx, cl
mov ecx, edx
mov dl, byte [edi]
shl bl, cl
or dl, bl
mov byte [edi], dl
mov ecx, dword [ebp + 0x7d08]
add ecx, eax
test esi, esi
mov dword [ebp + 0x7d08], ecx
jg 0x10006541
mov eax, dword [esp + 0x10]
sub eax, 8
cmp eax, 8
mov dword [esp + 0x10], eax
jl 0x10006615
push 8
push 0x45
push ebp
call fcn.100067c0
mov eax, dword [esp + 0x1c]
add esp, 0xc
sub eax, 8
mov dword [esp + 0x10], eax
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
cmp dword [esp + 0x10], 0x20
jl 0x1000667a
call fcn.10004e60
mov ebx, eax
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
xor esi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x10006672
mov ecx, dword [esp + 0x10]
mov eax, 8
cmp ecx, eax
jl 0x10006672
mov edx, ecx
push eax
sub edx, eax
mov dword [esp + 0x14], edx
movsx edx, byte [esi + ebx]
push edx
push ebp
call fcn.100067c0
add esp, 0xc
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
inc esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp esi, ecx
jl 0x1000663d
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x10]
cmp edi, 1
jl 0x100066b0
mov eax, dword [ebp + 0x1308c]
push 1
push eax
push ebp
call fcn.100067c0
mov eax, dword [esi + 0x60]
mov edx, dword [ebp + 0x1308c]
add esp, 0xc
xor ecx, ecx
test eax, eax
sete cl
xor edx, ecx
dec edi
mov dword [ebp + 0x1308c], edx
jne 0x10006683
xor edi, edi
pop ebp
mov dword [ebx + 0x13090], edi
mov dword [ebx + 0xce84], edi
test byte [ebx + 0x21d30], 2
je 0x100066f7
mov edx, dword [ebx + 0x21d40]
push edx
call fcn.10014340
fmul qword [0x1002e0e8]
push ecx
fadd qword [0x1002e1c0]
fstp qword [esp]
call fcn.10024f5b
add esp, 8
call fcn.100239a0
mov dword [ebx + 0x21d38], eax
test byte [ebx + 0x21d30], 4
je 0x100067b2
fld dword [ebx + 0x21d34]
fmul qword [0x1002e318]
fldlg2
sub esp, 8
fxch st(1)
fyl2x
fmul qword [0x1002e310]
fstp qword [esp]
call fcn.10025221
add esp, 8
call fcn.100239a0
cmp eax, edi
mov dword [ebx + 0x21d44], eax
jle 0x100067a8
fld dword [esi + 0x10]
fcomp qword [0x1002e0f0]
fnstsw ax
test ah, 0x40
jne 0x10006759
fld dword [esi + 0x10]
fcomp qword [0x1002e130]
fnstsw ax
test ah, 0x40
je 0x100067a8
fld dword [ebx + 0x21d34]
cmp dword [0x100535ac], 0
jne 0x10006770
fdivr qword [0x1002e308]
jmp 0x10006781
push dword [0x1002e30c]
push dword [0x1002e308]
call fcn.10024568
sub esp, 8
fmul qword [0x1002e300]
fstp qword [esp]
call fcn.10024f5b
fmul qword [0x1002e248]
add esp, 8
pop edi
pop esi
fstp dword [ebx + 0x21d48]
pop ebx
add esp, 0x10
ret
mov dword [ebx + 0x21d48], 0xbf800000
pop edi
pop esi
pop ebx
add esp, 0x10
ret