Function at 0x4102dd
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x124
push ebx
push ebp
push esi
lea eax, [esp + 0x18]
push edi
push eax
call sub.KERNEL32.dll_GetSystemTimeAsFileTime
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x14c]
mov eax, ecx
mov dword [esp + 0x30], edx
cdq
and edx, 0x1f
lea ebx, [esp + 0x34]
add eax, edx
lea ebp, [esp + 0xb4]
mov esi, eax
mov eax, ecx
mov ecx, dword [esp + 0x148]
mov dword [esp + 0x10], 0x20
cdq
and edx, 0xf
sub ebx, ecx
add eax, edx
mov edi, eax
sar esi, 5
sar edi, 4
sub ebp, ecx
mov edx, dword [ecx]
mov eax, esi
add eax, edx
add ecx, 4
cdq
idiv edi
mov dword [ecx + ebx - 4], eax
mov eax, dword [ecx + 0x7c]
add eax, esi
cdq
idiv edi
mov dword [ebp + ecx - 4], eax
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x410340
mov edi, 1
mov dword [esp + 0x24], edi
mov eax, dword [esp + 0x154]
mov ebx, dword [esp + 0x150]
push 0x1f
push edi
push eax
call fcn.0040f595
mov eax, 1
shl edi, 5
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], edi
jmp 0x4103a4
mov ebx, dword [esp + 0x150]
mov edi, dword [esp + 0x28]
or edi, eax
lea ecx, [esp + 0x1c]
shl edi, 5
push ecx
or edi, 0x8001
call sub.KERNEL32.dll_GetSystemTimeAsFileTime
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
test ebx, ebx
je 0x4103ec
mov eax, ebx
mov ebx, dword [esp + 0x2c]
imul eax, eax, 0x23c34600
mov ebp, dword [esp + 0x30]
cdq
add eax, ebx
adc edx, ebp
cmp ecx, edx
jg 0x410560
jl 0x4103ec
cmp esi, eax
ja 0x410560
mov dword [esp + 0x10], 0x1f
xor ebp, ebp
mov eax, ebp
xor ecx, ecx
lea esi, [esp + 0x34]
mov ebx, dword [esi]
xor edx, edx
push edi
mov edi, dword [0x4339a4]
lea edi, [edi + 8]
mov dl, byte [edi + eax]
pop edi
cmp edx, ebx
jne 0x41043a
mov edx, eax
mov ebx, eax
shr edx, 0xf
and edx, 1
and ebx, 1
xor edx, ebx
neg edx
sbb edx, edx
add esi, 4
not edx
and edx, edi
shr eax, 1
xor eax, edx
inc ecx
cmp ecx, 0x20
jl 0x4103fe
jmp 0x410443
cmp ecx, 0x20
jl 0x41051d
mov ecx, 0x60
mov edx, eax
mov esi, eax
shr edx, 0xf
and edx, 1
and esi, 1
xor edx, esi
neg edx
sbb edx, edx
not edx
and edx, edi
shr eax, 1
xor eax, edx
dec ecx
jne 0x410448
xor ecx, ecx
lea esi, [esp + 0xb4]
mov ebx, dword [esi]
xor edx, edx
push edi
mov edi, dword [0x4339a4]
lea edi, [edi + 8]
mov dl, byte [edi + eax]
pop edi
cmp edx, ebx
jne 0x4104b8
mov edx, eax
mov ebx, eax
shr edx, 0xf
and edx, 1
and ebx, 1
xor edx, ebx
neg edx
sbb edx, edx
add esi, 4
not edx
and edx, edi
shr eax, 1
xor eax, edx
inc ecx
cmp dword [0x4339a8], 0
jne 0x410560
cmp ecx, 0x20
jl 0x41046f
jmp 0x4104bd
cmp ecx, 0x20
jl 0x41051d
mov eax, ebp
mov edx, 0x60
test ah, 0x80
mov ecx, eax
je 0x4104cd
xor ecx, edi
add ecx, ecx
and ecx, 0xffff
mov esi, ecx
not esi
xor esi, eax
shr esi, 0xf
and esi, 1
xor esi, ecx
dec edx
mov eax, esi
jne 0x4104c4
mov edx, dword [esp + 0x144]
add eax, eax
shr esi, 0xf
mov ecx, edi
or esi, eax
mov eax, dword [esp + 0x140]
and ecx, 0x7fff
mov dword [esp + 0x14], ecx
push edx
push eax
lea ecx, [esp + 0x1c]
push esi
push ecx
call fcn.00410592
add esp, 0x10
test eax, eax
jge 0x41056e
inc ebp
cmp ebp, 0x10000
jb 0x4103f6
mov eax, dword [esp + 0x10]
dec eax
inc edi
test eax, eax
mov dword [esp + 0x10], eax
ja 0x4103f4
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 0x20
mov dword [esp + 0x18], eax
jb 0x410399
mov edi, dword [esp + 0x24]
inc edi
cmp edi, 0x20
mov dword [esp + 0x24], edi
jb 0x410370
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x124
ret
mov edx, dword [esp + 0x138]
mov cx, word [esp + 0x14]
pop edi
mov word [edx], cx
mov edx, dword [esp + 0x138]
mov word [edx], si
pop esi
pop ebp
pop ebx
add esp, 0x124
ret