Function at 0x10145bb0
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 0xc]
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x2c]
cmp edx, dword [ebx + 0x3add4]
jge 0x10145f00
push ebp
mov ebp, dword [esp + 0x38]
cmp ebp, dword [ebx + 0x3add8]
jge 0x10145eff
mov ecx, dword [ebx + 0x3adf4]
mov eax, dword [ebx + 0x3adec]
imul ecx, edx
push esi
add ecx, ebp
mov eax, dword [eax + ecx*4]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x3ade8]
movzx esi, byte [eax + 0x107a5d70]
mov eax, edx
cdq
idiv esi
mov ecx, eax
mov eax, ebp
cdq
idiv esi
imul ecx, dword [ebx + 0x3abd8]
add ecx, eax
imul edx, ecx, 0x54
mov ecx, dword [esp + 0xc]
add edx, dword [ebx + 0x3abd0]
mov al, byte [ecx + 0x9f]
mov dword [esp + 0x18], edx
test al, al
js 0x10145c43
cmp byte [ecx + 0x14], 0
jg 0x10145c43
mov eax, dword [esp + 0x30]
pop esi
pop ebp
pop ebx
inc dword [eax + 0x10]
add esp, 0x20
ret
mov esi, dword [esp + 0x30]
xor ebx, ebx
push edi
inc dword [esi + 0xc]
cmp byte [ecx + 0x15], bl
mov al, byte [ecx + 5]
setg bl
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x38]
cmp al, 0x10
je 0x10145cc9
cmp al, 0x18
je 0x10145cc9
cmp al, 0x13
je 0x10145c83
cmp al, 0x15
je 0x10145c83
cmp al, 0x14
je 0x10145c83
cmp al, 0x16
je 0x10145c83
mov eax, dword [esp + 0x14]
inc eax
add dword [esi + 0x14], eax
jmp 0x10145d10
inc dword [esi + 0x14]
cmp al, 0x13
je 0x10145c92
cmp al, 0x15
je 0x10145c92
xor edi, edi
jmp 0x10145c97
mov edi, 1
push edi
push edx
push ecx
call fcn.101463a0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
push ebx
mov eax, dword [eax + edi*4 + 0xc]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x38]
push eax
push esi
call fcn.10146780
mov ecx, dword [esp + 0x2c]
add esp, 0x1c
jmp 0x10145d10
mov eax, dword [esp + 0x14]
lea ebp, [ecx + 0xc]
inc eax
xor edi, edi
mov dword [esp + 0x20], eax
push edi
push edx
push ecx
call fcn.101463a0
mov dword [esp + 0x30], eax
mov eax, dword [ebp]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
push ebx
push eax
lea eax, [esp + 0x38]
push eax
push esi
call fcn.10146780
mov ecx, dword [esp + 0x2c]
lea ebp, [ebp + 4]
mov edx, dword [esp + 0x38]
inc edi
add esp, 0x1c
cmp edi, dword [esp + 0x20]
jl 0x10145cd7
mov eax, dword [ecx]
mov edi, dword [ebx + 0x3eee0]
mov edx, dword [esp + 0x40]
shl edx, 2
movzx ecx, byte [eax + 0x107a5da0]
mov ebp, dword [edi + 0x20]
movzx ebx, byte [eax + 0x107a5db8]
mov eax, dword [edi + 0x28]
dec ebx
mov dword [esp + 0x28], ecx
mov ecx, ebp
imul ecx, dword [esp + 0x3c]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x10], ebx
lea ecx, [eax + ecx*4]
add ecx, edx
test byte [edi + 0x8c], 8
mov dword [esp + 0x3c], ecx
je 0x10145e51
test ebx, ebx
jle 0x10145efd
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x28]
dec edi
mov dword [esp + 0x2c], edi
mov eax, dword [eax + 0x3e7a8]
mov eax, dword [eax + 0x48]
sub eax, 8
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x28], eax
test edi, edi
jle 0x10145e36
mov edx, dword [esi + 0x3c]
mov dword [esp + 0x18], edx
mov edx, dword [esi + 0x40]
mov dword [esp + 0x1c], edx
mov edx, dword [esi + 0x44]
mov dword [esp + 0x20], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], edi
nop dword [eax]
add eax, ecx
mov ecx, dword [esp + 0x14]
movzx edi, word [eax*2]
movzx eax, word [eax*2 + 2]
sub eax, edi
cdq
mov ebx, eax
xor ebx, edx
sub ebx, edx
sar ebx, cl
mov ecx, dword [esp + 0x3c]
add ecx, ebp
add ecx, dword [esp + 0x38]
movzx eax, word [ecx + ecx]
mov ecx, dword [esp + 0x14]
sub eax, edi
cdq
xor eax, edx
sub eax, edx
sar eax, cl
mov ecx, dword [esp + 0x18]
add ecx, ebx
mov dword [esp + 0x18], ecx
mov dword [esi + 0x3c], ecx
mov ecx, dword [esp + 0x1c]
add ecx, eax
imul eax, ebx
mov dword [esp + 0x1c], ecx
mov dword [esi + 0x40], ecx
mov ecx, dword [esp + 0x20]
add ecx, eax
mov eax, dword [esp + 0x38]
inc eax
mov dword [esp + 0x20], ecx
sub dword [esp + 0x24], 1
mov dword [esi + 0x44], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x38], eax
jne 0x10145db0
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
add eax, ebp
sub ebx, 1
mov dword [esp + 0x28], eax
mov dword [esp + 0x10], ebx
jne 0x10145d88
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
test ebx, ebx
jle 0x10145efd
mov edx, dword [esp + 0x28]
dec edx
mov dword [esp + 0x2c], edx
test edx, edx
jle 0x10145eea
mov eax, dword [esi + 0x3c]
mov ebp, ecx
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0x40]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x44]
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
movzx ecx, byte [ebp]
lea ebp, [ebp + 1]
movzx eax, byte [ebp]
sub eax, ecx
cdq
mov edi, eax
mov eax, dword [esp + 0x1c]
xor edi, edx
sub edi, edx
movzx eax, byte [eax + ebp - 1]
sub eax, ecx
mov ecx, dword [esp + 0x38]
add ecx, edi
cdq
xor eax, edx
mov dword [esp + 0x38], ecx
mov dword [esi + 0x3c], ecx
sub eax, edx
mov ecx, dword [esp + 0x28]
add ecx, eax
imul eax, edi
mov dword [esp + 0x28], ecx
mov dword [esi + 0x40], ecx
mov ecx, dword [esp + 0x24]
add ecx, eax
sub dword [esp + 0x20], 1
mov dword [esp + 0x24], ecx
mov dword [esi + 0x44], ecx
jne 0x10145e85
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x10]
mov edx, dword [esp + 0x2c]
add ecx, ebp
sub ebx, 1
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x10], ebx
jne 0x10145e62
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret