Function at 0x10167250
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x103217f9
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x1043900c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
cmp edi, 5
je 0x1016728c
cmp edi, 6
jne 0x1016753d
mov eax, dword [0x1060b5e0]
cmp byte [eax + 0xc50], 0
je 0x10167533
cmp byte [eax + 0xc68], 0
je 0x10167533
mov ecx, dword [0x1060b288]
mov eax, dword [ecx]
mov eax, dword [eax + 0x68]
call eax
test al, al
je 0x10167533
mov ecx, dword [0x1060b288]
mov eax, dword [ecx]
mov eax, dword [eax + 0x148]
call eax
test al, al
jne 0x10167533
mov ecx, dword [0x1060b5e0]
mov ecx, dword [ecx + 0xaa8]
call fcn.100c5eb0
push eax
call fcn.101676e0
mov esi, eax
mov dword [ebp - 0x5c], esi
test esi, esi
je 0x1016753d
cmp edi, 5
jne 0x10167497
mov ecx, dword [0x1060b5e0]
mov ecx, dword [ecx + 0xaa8]
call fcn.100cc510
cmp byte [0x104b1320], 0
mov eax, dword [eax]
mov dword [0x10611170], eax
jne 0x1016738a
mov byte [0x104b1320], 1
xor esi, esi
nop
xor edx, edx
mov ebx, esi
xor edx, dword [0x104b1334]
xor ebx, dword [0x104b1330]
xor edx, 0xd28f2c5
xor ebx, 0x1de26cd5
mov ecx, edx
mov eax, ebx
shld ecx, eax, 0xd
xor edx, ecx
shl eax, 0xd
xor ebx, eax
mov ecx, edx
mov eax, ebx
shrd eax, ecx, 7
shr ecx, 7
xor ebx, eax
xor edx, ecx
mov ecx, ebx
shld edx, ecx, 0x11
shl ecx, 0x11
xor cl, byte [esi + 0x104b1321]
xor cl, bl
mov byte [esi + 0x104b1321], cl
inc esi
cmp esi, 0xe
jb 0x10167330
mov esi, dword [ebp - 0x5c]
push ecx
push 0x104b132e
push 0x104b1321
lea ecx, [ebp - 0x28]
call fcn.1001a620
mov dword [ebp - 4], 0
lea edx, [ebp - 0x28]
mov ecx, dword [0x1060b2f0]
cmp dword [ebp - 0x14], 0x10
cmovae edx, dword [ebp - 0x28]
mov eax, dword [ecx]
push edx
mov eax, dword [eax + 0xc]
call eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
mov ebx, eax
call fcn.10019dd0
test ebx, ebx
je 0x1016740b
sub esp, 8
push esi
push ecx
mov ecx, ebx
call fcn.1015f650
mov eax, dword [0x1060b5e0]
mov ecx, esi
mov eax, dword [eax + 0x7f20]
call eax
sub esp, 8
mov esi, eax
push dword [esi + 8]
push ecx
mov ecx, ebx
call fcn.1015f650
sub esp, 8
push dword [esi + 0xc]
push ecx
mov ecx, ebx
call fcn.1015f650
mov eax, dword [0x1060b5e0]
mov ecx, dword [0x1060b2a4]
push dword [ebp - 0x5c]
mov esi, dword [eax + 0xaa8]
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
mov edx, dword [esi]
mov ecx, esi
push eax
mov edx, dword [edx + 0x12c]
call edx
mov eax, dword [0x1060b274]
mov ecx, dword [0x104c14e0]
mov eax, dword [eax]
mov ebx, dword [eax + 0x10]
mov eax, dword [0x1060b5e0]
mov dword [ebp - 0x68], ebx
mov eax, dword [eax + 0xaa8]
mov dword [ebp - 0x60], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x10611728]
cmp eax, dword [ecx + 4]
jg 0x1016755b
mov eax, dword [0x10611a20]
mov ecx, dword [ebp - 0x60]
cmp dword [ecx + eax], 0
je 0x101674e5
mov ecx, dword [0x1060b288]
mov eax, dword [ecx]
mov eax, dword [eax + 0x148]
call eax
test al, al
je 0x101674e5
mov eax, 1
jmp 0x101674e7
cmp edi, 6
jne 0x1016740b
cmp dword [0x10611170], 0
je 0x1016740b
mov ecx, dword [0x1060b288]
mov eax, dword [ecx]
mov eax, dword [eax + 0x148]
call eax
test al, al
je 0x1016740b
mov eax, dword [0x1060b5e0]
push dword [0x10611170]
mov ecx, dword [eax + 0xaa8]
mov eax, dword [ecx]
mov eax, dword [eax + 0x12c]
call eax
jmp 0x10167433
xor eax, eax
mov ecx, dword [0x1060b274]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x1016753d
cmp edi, 6
jne 0x10167514
mov ecx, dword [0x10611170]
test ecx, ecx
je 0x10167514
mov eax, dword [esi]
push ecx
mov ecx, esi
mov eax, dword [eax + 0x12c]
call eax
jmp 0x1016753d
mov ecx, dword [0x1060b2a4]
push dword [ebp - 0x5c]
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
mov edx, dword [esi]
mov ecx, esi
push eax
mov eax, dword [edx + 0x12c]
call eax
jmp 0x1016753d
mov dword [0x10611170], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.102bb91c
mov esp, ebp
pop ebp
ret 4
push 0x10611728
call fcn.102bba07
add esp, 4
cmp dword [0x10611728], 0xffffffff
jne 0x1016746e
mov dword [ebp - 4], 1
cmp byte [0x104aa4c0], 0
jne 0x101675e9
mov byte [0x104aa4c0], 1
xor esi, esi
jmp 0x10167590
xor edx, edx
mov ebx, esi
xor edx, dword [0x104aa4d4]
xor ebx, dword [0x104aa4d0]
xor edx, 0xd28f2c5
xor ebx, 0x1de26cd5
mov ecx, edx
mov eax, ebx
shld ecx, eax, 0xd
xor edx, ecx
shl eax, 0xd
xor ebx, eax
mov ecx, edx
mov eax, ebx
shrd eax, ecx, 7
shr ecx, 7
xor ebx, eax
xor edx, ecx
mov ecx, ebx
shld edx, ecx, 0x11
shl ecx, 0x11
xor cl, byte [esi + 0x104aa4c1]
xor cl, bl
mov byte [esi + 0x104aa4c1], cl
inc esi
cmp esi, 0xb
jb 0x10167590
jmp 0x101675e9
push ecx
push 0x104aa4cb
push 0x104aa4c1
lea ecx, [ebp - 0x58]
call fcn.1001a620
mov byte [ebp - 4], 2
lea eax, [ebp - 0x58]
cmp dword [ebp - 0x44], 0x10
cmovae eax, dword [ebp - 0x58]
cmp byte [0x104aace0], 0
mov dword [ebp - 0x64], eax
jne 0x1016767b
mov byte [0x104aace0], 1
xor esi, esi
jmp 0x10167622
xor edx, edx
mov ebx, esi
xor edx, dword [0x104aacf4]
xor ebx, dword [0x104aacf0]
xor edx, 0xd28f2c5
xor ebx, 0x1de26cd5
mov ecx, edx
mov eax, ebx
shld ecx, eax, 0xd
xor edx, ecx
shl eax, 0xd
xor ebx, eax
mov ecx, edx
mov eax, ebx
shrd eax, ecx, 7
shr ecx, 7
xor ebx, eax
xor edx, ecx
mov ecx, ebx
shld edx, ecx, 0x11
shl ecx, 0x11
xor cl, byte [esi + 0x104aace1]
xor cl, bl
mov byte [esi + 0x104aace1], cl
inc esi
cmp esi, 0xc
jb 0x10167622
jmp 0x1016767b
push ecx
push 0x104aacec
push 0x104aace1
lea ecx, [ebp - 0x40]
call fcn.1001a620
mov byte [ebp - 4], 3
lea eax, [ebp - 0x40]
cmp dword [ebp - 0x2c], 0x10
push 0
push dword [ebp - 0x64]
cmovae eax, dword [ebp - 0x40]
push eax
call fcn.10171b70
lea ecx, [ebp - 0x40]
mov dword [0x10611a20], eax
call fcn.10019dd0
lea ecx, [ebp - 0x58]
call fcn.10019dd0
push 0x10611728
mov dword [ebp - 4], 0xffffffff
call fcn.102bb9b6
mov ebx, dword [ebp - 0x68]
add esp, 4
jmp 0x1016746e