Function at 0x1017d210
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi]
test esi, esi
je 0x1017d239
push dword [ebp + 0x10]
push ebx
call fcn.101a0ec0
xor edx, edx
add esp, 8
div esi
mov esi, edx
jmp 0x1017d23b
xor esi, esi
push esi
push dword [ebp + 0x10]
push ebx
push edi
call fcn.10157540
mov ecx, eax
add esp, 0x10
test ecx, ecx
je 0x1017d2be
mov eax, dword [ebp + 0x14]
mov ebx, dword [ecx + 8]
test eax, eax
jne 0x1017d2ac
mov edx, dword [ecx + 4]
mov eax, dword [ecx]
test edx, edx
je 0x1017d266
mov dword [edx], eax
jmp 0x1017d269
mov dword [edi + 8], eax
mov edx, dword [ecx]
test edx, edx
je 0x1017d275
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov edx, dword [edi + 0xc]
test edx, edx
je 0x1017d28b
cmp dword [edx + esi*8 + 4], ecx
jne 0x1017d288
mov eax, dword [ecx]
mov dword [edx + esi*8 + 4], eax
dec dword [edx + esi*8]
push ecx
call fcn.1013e5e0
add esp, 4
add dword [edi + 4], 0xffffffff
jne 0x1017d2b5
push edi
call fcn.1017d0e0
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ecx + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [ecx + 0xc], eax
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x1017d4c2
push 0x14
call fcn.101805a0
mov ecx, eax
add esp, 4
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x1017d2b5
mov eax, dword [ebp + 0xc]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [ecx + 0x10], eax
mov dword [ecx + 8], ebx
inc dword [edi + 4]
mov edx, dword [edi + 4]
cmp edx, 0xa
jb 0x1017d458
mov eax, dword [edi]
add eax, eax
cmp edx, eax
jbe 0x1017d458
lea ebx, [edx + edx]
mov edx, 0x80
lea eax, [ebx*8]
cmp eax, 0x400
cmova ebx, edx
cmp ebx, dword [edi]
je 0x1017d458
mov eax, dword [0x1022e0c0]
test eax, eax
je 0x1017d330
call eax
lea eax, [ebx*8]
push eax
call fcn.101805a0
mov ecx, dword [0x1022e0c4]
add esp, 4
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ecx, ecx
je 0x1017d351
call ecx
test ebx, ebx
je 0x1017d455
push dword [edi + 0xc]
call fcn.1013e5e0
push ebx
mov dword [edi + 0xc], ebx
call dword [0x1022a50c]
shr eax, 3
mov dword [ebp - 0xc], eax
mov dword [edi], eax
lea ecx, [eax*8]
push ecx
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
mov esi, dword [edi + 8]
add esp, 0x14
mov dword [edi + 8], 0
test esi, esi
je 0x1017d441
mov edx, dword [esi + 0x10]
xor ebx, ebx
mov eax, dword [esi + 0xc]
mov dword [ebp - 8], eax
test edx, edx
jle 0x1017d3d0
mov edi, eax
nop dword [eax]
movzx eax, byte [edi]
lea edi, [edi + 1]
dec edx
movzx ecx, byte [eax + 0x101d1f48]
lea eax, [ebx*8]
xor ecx, eax
xor ebx, ecx
test edx, edx
jg 0x1017d3b0
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 0x1017d41b
mov eax, dword [edx]
test eax, eax
je 0x1017d3f1
mov ecx, dword [edx + 4]
jmp 0x1017d3f3
xor ecx, ecx
inc eax
mov dword [edx + 4], esi
mov dword [edx], eax
test ecx, ecx
je 0x1017d41b
mov dword [esi], ecx
mov eax, dword [ecx + 4]
mov dword [esi + 4], eax
mov eax, dword [ecx + 4]
test eax, eax
je 0x1017d413
mov dword [eax], esi
mov dword [ecx + 4], esi
jmp 0x1017d434
mov dword [edi + 8], esi
mov dword [ecx + 4], esi
jmp 0x1017d434
mov eax, dword [edi + 8]
mov dword [esi], eax
mov eax, dword [edi + 8]
test eax, eax
je 0x1017d42a
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 0x1017d398
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.101a0ec0
xor edx, edx
add esp, 8
div dword [edi]
mov esi, edx
mov ecx, dword [ebp - 4]
mov eax, dword [edi + 0xc]
test eax, eax
je 0x1017d4a9
lea esi, [eax + esi*8]
test esi, esi
je 0x1017d4a9
mov eax, dword [esi]
test eax, eax
je 0x1017d471
mov edx, dword [esi + 4]
jmp 0x1017d473
xor edx, edx
inc eax
mov dword [esi + 4], ecx
mov dword [esi], eax
test edx, edx
je 0x1017d4a9
mov dword [ecx], edx
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov eax, dword [edx + 4]
test eax, eax
je 0x1017d49a
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 0x1017d4b8
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