Function at 0x10107160
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x2d8
sub esp, 0xc
cdq
idiv dword [0x1018cd00]
mov eax, dword [0x1018ccfc]
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
mov cl, byte [edx + eax]
mov byte [0x1018cd11], cl
mov ecx, dword [esp + 0x28]
cmp ebp, ecx
jne 0x1010719d
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov dword [eax], ecx
pop ebx
add esp, 0xc
ret 0xc
mov edx, dword [ebp]
mov eax, 0x52
mov word [esp + 0x14], ax
mov word [esp + 0x16], ax
mov al, byte [0x10195198]
mov dword [esp + 0x10], edx
test al, 1
mov word [esp + 0x18], 0x4f
jne 0x101071ec
mov bl, al
lea eax, [esp + 0x14]
or bl, 1
push 0x3c
push eax
mov ecx, 0x1019519c
mov byte [0x10195198], bl
call fcn.100776d0
push 0x10108860
call fcn.1013c36b
add esp, 4
mov esi, dword [0x1019519c]
add ebp, 0x20
push esi
call fcn.1013c2c2
mov ecx, dword [ebp + 8]
add esp, 4
push eax
push esi
push ecx
push 0
mov ecx, ebp
call fcn.1000d2b0
test eax, eax
je 0x1010742b
mov al, byte [0x101951a0]
mov word [esp + 0x14], 0x60
test al, 1
mov word [esp + 0x16], 0x7e
mov word [esp + 0x18], 0x7d
jne 0x1010725c
mov bl, al
lea edx, [esp + 0x14]
or bl, 1
push 0xe
push edx
mov ecx, 0x101951a4
mov byte [0x101951a0], bl
call fcn.100776d0
push 0x10108870
call fcn.1013c36b
add esp, 4
mov esi, dword [0x101951a4]
push esi
call fcn.1013c2c2
add esp, 4
mov ecx, ebp
push eax
mov eax, dword [ebp + 8]
push esi
push eax
push 0
call fcn.1000d2b0
test eax, eax
je 0x1010742b
mov al, byte [0x101951a8]
mov word [esp + 0x28], 0x5e
test al, 1
mov word [esp + 0x2a], 0
jne 0x10107307
mov bl, al
push 6
or bl, 1
mov byte [0x101951a8], bl
call fcn.1013c2df
add esp, 4
mov dword [0x101951ac], eax
mov edi, 0x30
xor esi, esi
mov bx, word [esp + esi + 0x28]
push edi
mov ecx, ebx
and ecx, 0xffff
push ecx
mov ecx, 0x101951ac
call fcn.1004a650
mov edx, dword [0x101951ac]
xor eax, ebx
xor eax, edi
xor edi, edi
mov word [esi + edx], ax
mov eax, dword [0x101951ac]
mov di, word [esi + eax]
add esi, 2
cmp esi, 4
jb 0x101072ba
push 0x10108880
mov word [eax + 4], 0
call fcn.1013c36b
add esp, 4
mov esi, dword [0x101951ac]
push esi
call fcn.1013c2c2
mov ebx, dword [ebp + 8]
mov edi, eax
add esp, 4
cmp ebx, edi
mov ecx, ebx
jb 0x10107323
mov ecx, edi
mov eax, dword [ebp + 4]
push ecx
push esi
push eax
call fcn.100145d0
add esp, 0xc
test eax, eax
jne 0x10107346
cmp ebx, edi
jb 0x10107346
cmp ebx, edi
setne al
test eax, eax
je 0x1010742b
mov al, byte [0x101951b0]
mov word [esp + 0x28], 0x5a
test al, 1
mov word [esp + 0x2a], 0x5c
jne 0x101073c2
mov bl, al
push 6
or bl, 1
mov byte [0x101951b0], bl
call fcn.1013c2df
add esp, 4
mov dword [0x101951b4], eax
xor edi, edi
mov si, word [esp + edi + 0x28]
push 0x14
mov eax, esi
mov ecx, 0x101951b4
and eax, 0xffff
push eax
call fcn.1002ea10
mov ecx, dword [0x101951b4]
sub esi, eax
add esi, 0x14
mov word [edi + ecx], si
add edi, 2
cmp edi, 4
jb 0x10107379
mov edx, dword [0x101951b4]
push 0x10108890
mov word [edx + 4], 0
call fcn.1013c36b
add esp, 4
mov edi, dword [0x101951b4]
push edi
call fcn.1013c2c2
mov ebx, dword [ebp + 8]
add esp, 4
cmp ebx, eax
mov esi, ebx
jb 0x101073dc
mov esi, eax
mov ecx, dword [ebp + 4]
mov edx, edi
test esi, esi
jbe 0x10107408
mov di, word [ecx]
cmp di, word [edx]
jne 0x101073f8
add ecx, 2
add edx, 2
dec esi
jne 0x101073e5
jmp 0x10107408
mov cx, word [ecx]
cmp cx, word [edx]
sbb ecx, ecx
and ecx, 0xfffffffe
inc ecx
test ecx, ecx
jne 0x10107417
cmp ebx, eax
jb 0x10107417
xor ecx, ecx
cmp ebx, eax
setne cl
test ecx, ecx
je 0x1010742b
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
mov dword [eax], edx
pop ebx
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov dword [eax], ecx
pop ebx
add esp, 0xc
ret 0xc