Function at 0x638170
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi]
test esi, esi
je 0x638198
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00658ff0
xor edx, edx
add esp, 8
div esi
mov ebx, edx
jmp 0x63819a
xor ebx, ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.00608e10
mov esi, eax
add esp, 0x10
test esi, esi
je 0x63828d
mov eax, dword [esi + 8]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x63827a
mov ecx, dword [esi + 4]
mov eax, dword [esi]
test ecx, ecx
je 0x6381d2
mov dword [ecx], eax
jmp 0x6381d5
mov dword [edi + 8], eax
mov ecx, dword [esi]
test ecx, ecx
je 0x6381e1
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x6381f7
cmp dword [ecx + ebx*8 + 4], esi
jne 0x6381f4
mov eax, dword [esi]
mov dword [ecx + ebx*8 + 4], eax
dec dword [ecx + ebx*8]
cmp dword [0x6f1bb8], 0
je 0x638257
mov eax, dword [0x6ff2f0]
test eax, eax
je 0x638213
push eax
call dword [0x6f1c00]
add esp, 4
push esi
call dword [0x6f1bdc]
mov ecx, dword [0x6ff1b8]
neg eax
add ecx, eax
add esp, 4
mov dword [0x6ff1b8], ecx
cmp ecx, dword [0x6ff1dc]
jle 0x63823b
mov dword [0x6ff1dc], ecx
push esi
call dword [0x6f1bd4]
mov eax, dword [0x6ff2f0]
add esp, 4
test eax, eax
je 0x638261
push eax
call dword [0x6f1c08]
jmp 0x63825e
push esi
call dword [0x6f1bd4]
add esp, 4
add dword [edi + 4], 0xffffffff
jne 0x638283
push edi
call fcn.00638000
mov eax, dword [ebp + 8]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x638494
push 0x14
call fcn.0063b730
mov ecx, eax
add esp, 4
mov dword [ebp - 4], ecx
test ecx, ecx
jne 0x6382b4
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [ecx + 0x10], eax
mov dword [ecx + 8], esi
mov edx, dword [edi + 4]
inc edx
mov dword [edi + 4], edx
cmp edx, 0xa
jb 0x63842a
mov eax, dword [edi]
add eax, eax
cmp edx, eax
jbe 0x63842a
lea esi, [edx + edx]
mov edx, 0x80
lea eax, [esi*8]
cmp eax, 0x400
cmova esi, edx
cmp esi, dword [edi]
je 0x63842a
mov eax, dword [0x6ff200]
test eax, eax
je 0x638309
call eax
lea eax, [esi*8]
push eax
call fcn.0063b730
mov ecx, dword [0x6ff204]
add esp, 4
mov esi, eax
mov dword [ebp - 0x10], esi
test ecx, ecx
je 0x63832a
call ecx
test esi, esi
je 0x638427
push dword [edi + 0xc]
call fcn.005f7d20
push esi
mov dword [edi + 0xc], esi
call dword [0x6f1bdc]
shr eax, 3
mov dword [ebp - 0xc], eax
mov dword [edi], eax
lea ecx, [eax*8]
push ecx
push 0
push esi
call fcn.005bc9a0
mov esi, dword [edi + 8]
add esp, 0x14
mov dword [edi + 8], 0
test esi, esi
je 0x638413
mov edx, dword [esi + 0x10]
xor ebx, ebx
mov eax, dword [esi + 0xc]
mov dword [ebp - 8], eax
test edx, edx
jle 0x6383a2
mov edi, eax
movzx eax, byte [edi]
lea edi, [edi + 1]
dec edx
movzx ecx, byte [eax + 0x6b4890]
lea eax, [ebx*8]
xor ecx, eax
xor ebx, ecx
test edx, edx
jg 0x638382
mov edi, dword [ebp + 8]
mov eax, dword [esi]
xor edx, edx
mov dword [ebp - 8], eax
mov eax, ebx
div dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
lea edx, [eax + edx*8]
test edx, edx
je 0x6383ed
mov eax, dword [edx]
test eax, eax
je 0x6383c3
mov ecx, dword [edx + 4]
jmp 0x6383c5
xor ecx, ecx
inc eax
mov dword [edx + 4], esi
mov dword [edx], eax
test ecx, ecx
je 0x6383ed
mov dword [esi], ecx
mov eax, dword [ecx + 4]
mov dword [esi + 4], eax
mov eax, dword [ecx + 4]
test eax, eax
je 0x6383e5
mov dword [eax], esi
mov dword [ecx + 4], esi
jmp 0x638406
mov dword [edi + 8], esi
mov dword [ecx + 4], esi
jmp 0x638406
mov eax, dword [edi + 8]
mov dword [esi], eax
mov eax, dword [edi + 8]
test eax, eax
je 0x6383fc
mov dword [eax + 4], esi
mov dword [esi + 4], 0
mov dword [edi + 8], esi
mov eax, dword [ebp - 8]
mov esi, eax
test eax, eax
jne 0x638371
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00658ff0
xor edx, edx
add esp, 8
div dword [edi]
mov ebx, edx
mov ecx, dword [ebp - 4]
mov eax, dword [edi + 0xc]
test eax, eax
je 0x63847b
lea esi, [eax + ebx*8]
test esi, esi
je 0x63847b
mov eax, dword [esi]
test eax, eax
je 0x638443
mov edx, dword [esi + 4]
jmp 0x638445
xor edx, edx
inc eax
mov dword [esi + 4], ecx
mov dword [esi], eax
test edx, edx
je 0x63847b
mov dword [ecx], edx
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov eax, dword [edx + 4]
test eax, eax
je 0x63846c
pop edi
mov dword [eax], ecx
xor eax, eax
pop esi
mov dword [edx + 4], ecx
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + 8], ecx
xor eax, eax
pop edi
pop esi
mov dword [edx + 4], ecx
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 8]
mov dword [ecx], eax
mov eax, dword [edi + 8]
test eax, eax
je 0x63848a
mov dword [eax + 4], ecx
mov dword [ecx + 4], 0
mov dword [edi + 8], ecx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret