Function at 0x100080d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2394
call fcn.100c66e0
mov eax, dword [0x100ff900]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
test byte [ebx + 0x144], 2
push edi
mov dword [ebp - 0x2380], ebx
mov dword [ebp - 0x2374], esi
mov dword [ebp - 0x2394], eax
je 0x10008115
mov ecx, dword [ebx + 0x168]
jmp 0x10008124
mov edx, dword [ebx + 0x170]
mov eax, dword [ebx + 0x160]
mov ecx, dword [eax + edx*4]
mov edi, dword [ecx + 0x30]
mov eax, dword [ebx + 0x170]
lea edx, [ebp - 0x236c]
push edx
push eax
mov ecx, ebx
mov dword [ebp - 0x2384], edi
call fcn.10007780
mov ecx, dword [ebx + 0x120]
test ecx, ecx
je 0x10008196
mov eax, dword [ebp - 0x2268]
imul eax, dword [ebp + 0xc]
lea edx, [ebp - 0x237c]
push edx
xor edx, edx
div dword [ebx + 0x17c]
push eax
push esi
call fcn.10003cd0
mov dword [ebp - 0x2388], eax
test eax, eax
je 0x10008453
cmp eax, 0x16
je 0x10008453
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100c5f50
mov esp, ebp
pop ebp
ret 0xc
test edi, 0x400000
je 0x1000830d
cmp dword [ebp - 0x226c], 2
jne 0x1000830d
mov eax, dword [ebp - 0x2268]
mov ecx, dword [ebx + 0x110]
lea eax, [eax + eax*8]
add eax, eax
add eax, eax
push 0
push eax
mov dword [ebp - 0x2370], eax
push 1
lea eax, [ebp - 0x244]
push eax
call fcn.100726c0
mov dword [ebp - 0x2388], eax
test eax, eax
jne 0x10008870
mov edi, dword [ebp - 0x2268]
cmp edi, 1
jne 0x1000822f
mov ecx, dword [ebp - 0x2370]
mov edx, dword [ebx + 0xec]
push edi
push 0x40
push ecx
push edi
push edx
lea eax, [ebp - 0x244]
push eax
call fcn.1002c3c0
mov edi, dword [ebp - 0x2268]
mov dword [ebp - 0x2388], eax
mov eax, edi
add esp, 0x18
shl eax, 7
mov dword [ebp - 0x237c], eax
jmp 0x10008459
test dword [ebp - 0x2384], 0x20000000
je 0x1000827d
cmp edi, 2
jne 0x1000827d
mov ecx, dword [ebp - 0x2370]
mov edx, dword [ebx + 0xec]
push 0x40
push ecx
push 1
push edx
lea eax, [ebp - 0x244]
push eax
call fcn.1002c6e0
mov edi, dword [ebp - 0x2268]
mov dword [ebp - 0x2388], eax
mov eax, edi
add esp, 0x14
shl eax, 7
mov dword [ebp - 0x237c], eax
jmp 0x10008459
mov eax, dword [ebp - 0x2370]
cdq
idiv edi
xor esi, esi
mov dword [ebp - 0x238c], eax
test edi, edi
jle 0x100082fd
mov eax, dword [ebp - 0x2370]
cdq
idiv edi
xor ecx, ecx
mov dword [ebp - 0x2390], eax
test eax, eax
jle 0x100082c7
lea edx, [ebp + esi*2 - 0x244]
mov edi, edi
mov ax, word [edx]
mov word [ebp + ecx*2 - 0x2244], ax
inc ecx
lea edx, [edx + edi*2]
cmp ecx, dword [ebp - 0x2390]
jl 0x100082b0
mov ecx, dword [ebp - 0x238c]
mov edx, dword [ebx + 0xec]
push edi
push 0x40
push ecx
push 1
lea eax, [edx + esi*2]
push eax
lea ecx, [ebp - 0x2244]
push ecx
call fcn.1002c3c0
mov edi, dword [ebp - 0x2268]
inc esi
add esp, 0x18
mov dword [ebp - 0x2388], eax
cmp esi, edi
jl 0x10008292
mov eax, edi
shl eax, 7
mov dword [ebp - 0x237c], eax
jmp 0x10008459
mov ecx, dword [ebx + 0x124]
test ecx, ecx
jne 0x1000814c
mov ecx, dword [ebx + 0x128]
xor edx, edx
test ecx, ecx
je 0x10008350
lea eax, [ebp - 0x237c]
push eax
mov eax, dword [ebp - 0x2268]
imul eax, dword [ebp + 0xc]
div dword [ebx + 0x17c]
push eax
push esi
call fcn.10003cd0
mov dword [ebp - 0x2388], eax
jmp 0x10008453
mov eax, dword [ebp + 0xc]
div dword [ebx + 0x17c]
lea ecx, [ebp - 0x237c]
push ecx
mov ecx, dword [ebx + 0x110]
imul eax, dword [ebp - 0x2268]
push eax
push 1
push esi
call fcn.100726c0
mov dword [ebp - 0x2388], eax
test eax, eax
je 0x10008389
cmp eax, 0x16
jne 0x10008870
cmp dword [ebp - 0x226c], 1
mov edi, dword [ebp - 0x237c]
jne 0x100083d6
mov ecx, edi
shr ecx, 3
mov eax, esi
mov dl, 0x80
test ecx, ecx
je 0x100083c2
xor byte [eax], dl
xor byte [eax + 1], dl
xor byte [eax + 2], dl
xor byte [eax + 3], dl
xor byte [eax + 4], dl
xor byte [eax + 5], dl
xor byte [eax + 6], dl
xor byte [eax + 7], dl
add eax, 8
dec ecx
jne 0x100083a5
mov ecx, edi
and ecx, 7
je 0x100083d6
lea esp, [esp]
xor byte [eax], dl
inc eax
dec ecx
jne 0x100083d0
test byte [ebx + 0x144], 8
je 0x10008453
mov eax, dword [ebp - 0x226c]
cmp eax, 2
jne 0x1000840e
mov edx, edi
xor ecx, ecx
shr edx, 1
je 0x10008453
movzx eax, word [esi + ecx*2]
mov di, ax
shr di, 8
shl eax, 8
or di, ax
mov word [esi + ecx*2], di
inc ecx
cmp ecx, edx
jb 0x100083f2
jmp 0x10008453
cmp eax, 5
jne 0x10008453
mov eax, edi
xor ecx, ecx
shr eax, 1
mov dword [ebp - 0x2390], eax
je 0x10008453
mov eax, dword [esi + ecx*4]
mov edx, eax
shl edx, 0x10
mov edi, eax
and edi, 0xff00
or edx, edi
movzx edi, byte [esi + ecx*4 + 3]
shl edx, 8
shr eax, 8
or edx, edi
and eax, 0xff00
or edx, eax
mov dword [esi + ecx*4], edx
inc ecx
cmp ecx, dword [ebp - 0x2390]
jb 0x10008421
mov edi, dword [ebp - 0x2268]
mov ecx, dword [ebx + 0x17c]
cmp edi, ecx
jge 0x1000885c
mov edx, dword [ebp - 0x2384]
mov eax, dword [ebp - 0x226c]
test edx, 0x400000
je 0x1000848a
cmp eax, 7
jne 0x1000848a
cmp ecx, 2
jne 0x10008494
lea esi, [ecx + 2]
jmp 0x100084c1
cmp eax, 6
jne 0x10008494
lea esi, [eax - 4]
jmp 0x100084c1
test edx, 0x800000
je 0x100084a5
cmp eax, 2
jne 0x100084a5
mov esi, eax
jmp 0x100084c1
cmp eax, 8
je 0x100084bc
cmp eax, 9
je 0x100084bc
mov eax, dword [ebp - 0x2258]
cdq
idiv edi
mov esi, eax
jmp 0x100084c1
mov esi, 0x10
mov eax, dword [ebp - 0x2374]
mov edx, dword [ebp - 0x237c]
mov ebx, esi
imul ebx, edi
sub eax, ebx
add eax, edx
mov dword [ebp - 0x2378], eax
mov eax, edx
xor edx, edx
div edi
xor edx, edx
sub eax, esi
imul eax, ecx
add eax, dword [ebp - 0x2374]
mov dword [ebp - 0x2370], eax
mov eax, dword [ebp - 0x237c]
div ebx
cmp esi, 1
jne 0x100085ad
cmp edi, esi
jne 0x10008550
test eax, eax
jle 0x1000883b
mov edx, dword [ebp - 0x2378]
mov esi, dword [ebp - 0x2370]
mov edi, eax
mov eax, dword [ebp - 0x2380]
dec ecx
js 0x10008539
lea esp, [esp]
dec ecx
mov bl, byte [edx]
mov byte [ecx + esi + 1], bl
jns 0x10008530
mov ecx, dword [eax + 0x17c]
dec edx
sub esi, ecx
dec edi
jne 0x10008526
mov edi, dword [ebp - 0x2268]
jmp 0x1000883b
test eax, eax
jle 0x1000883b
mov edx, dword [ebp - 0x2378]
mov esi, dword [ebp - 0x2370]
mov dword [ebp - 0x2374], eax
lea ebx, [ebx]
dec ecx
lea eax, [edi - 1]
js 0x10008590
cmp ecx, eax
jle 0x10008580
mov byte [ecx + esi], 0
jmp 0x10008587
mov bl, byte [eax + edx]
mov byte [ecx + esi], bl
dec eax
dec ecx
jns 0x10008576
mov edi, dword [ebp - 0x2268]
mov eax, dword [ebp - 0x2380]
mov ecx, dword [eax + 0x17c]
sub edx, edi
sub esi, ecx
dec dword [ebp - 0x2374]
jne 0x10008570
jmp 0x1000883b
cmp esi, 2
jne 0x1000865d
mov esi, dword [ebp - 0x2378]
mov edx, dword [ebp - 0x2370]
cmp edi, 1
jne 0x10008609
test eax, eax
jle 0x1000883b
mov edi, dword [ebp - 0x2380]
dec ecx
js 0x100085eb
jmp 0x100085e0
dec ecx
mov bx, word [esi]
mov word [edx + ecx*2 + 2], bx
jns 0x100085e0
mov ecx, dword [edi + 0x17c]
mov ebx, ecx
neg ebx
sub esi, 2
dec eax
lea edx, [edx + ebx*2]
jne 0x100085d5
mov edi, dword [ebp - 0x2268]
jmp 0x1000883b
test eax, eax
jle 0x1000883b
mov ebx, eax
dec ecx
lea eax, [edi - 1]
js 0x1000863b
lea esp, [esp]
cmp ecx, eax
jle 0x10008628
xor edi, edi
jmp 0x1000862d
mov di, word [esi + eax*2]
dec eax
dec ecx
mov word [edx + ecx*2 + 2], di
jns 0x10008620
mov edi, dword [ebp - 0x2268]
mov eax, dword [ebp - 0x2380]
mov ecx, edi
neg ecx
lea esi, [esi + ecx*2]
mov ecx, dword [eax + 0x17c]
mov eax, ecx
neg eax
dec ebx
lea edx, [edx + eax*2]
jne 0x10008613
jmp 0x1000883b
cmp esi, 4
jne 0x10008705
mov esi, dword [ebp - 0x2378]
mov edx, dword [ebp - 0x2370]
cmp edi, 1
jne 0x100086b0
test eax, eax
jle 0x1000883b
nop
dec ecx
js 0x1000868c
dec ecx
mov edi, dword [esi]
mov dword [edx + ecx*4 + 4], edi
jns 0x10008683
mov ecx, dword [ebp - 0x2380]
mov ecx, dword [ecx + 0x17c]
mov edi, ecx
neg edi
sub esi, 4
dec eax
lea edx, [edx + edi*4]
jne 0x10008680
mov edi, dword [ebp - 0x2268]
jmp 0x1000883b
test eax, eax
jle 0x1000883b
mov ebx, eax
lea ebx, [ebx]
dec ecx
lea eax, [edi - 1]
js 0x100086e3
cmp ecx, eax
jle 0x100086d3
mov dword [edx + ecx*4], 0
jmp 0x100086da
mov edi, dword [esi + eax*4]
mov dword [edx + ecx*4], edi
dec eax
dec ecx
jns 0x100086c6
mov edi, dword [ebp - 0x2268]
mov ecx, dword [ebp - 0x2380]
mov ecx, dword [ecx + 0x17c]
mov eax, edi
neg eax
lea esi, [esi + eax*4]
mov eax, ecx
neg eax
dec ebx
lea edx, [edx + eax*4]
jne 0x100086c0
jmp 0x1000883b
cmp edi, 1
jne 0x1000877e
test eax, eax
jle 0x1000883b
mov dword [ebp - 0x2374], eax
lea ebx, [ecx - 1]
test ebx, ebx
js 0x1000874e
mov edi, ebx
imul edi, esi
mov eax, esi
neg eax
add edi, dword [ebp - 0x2370]
mov dword [ebp - 0x2384], eax
mov ecx, dword [ebp - 0x2378]
push esi
push ecx
push edi
call fcn.100c6090
add edi, dword [ebp - 0x2384]
add esp, 0xc
dec ebx
jns 0x10008734
mov edx, dword [ebp - 0x2380]
mov ecx, dword [edx + 0x17c]
sub dword [ebp - 0x2378], esi
mov eax, ecx
imul eax, esi
sub dword [ebp - 0x2370], eax
dec dword [ebp - 0x2374]
jne 0x10008718
mov edi, dword [ebp - 0x2268]
jmp 0x1000883b
test eax, eax
jle 0x1000883b
mov dword [ebp - 0x2390], eax
lea esp, [esp]
lea edx, [edi - 1]
dec ecx
mov dword [ebp - 0x238c], edx
mov dword [ebp - 0x2374], ecx
js 0x1000880d
mov eax, esi
neg eax
mov dword [ebp - 0x2384], eax
mov eax, ecx
mov edi, eax
imul edi, esi
add edi, dword [ebp - 0x2370]
mov ebx, edx
imul ebx, esi
add ebx, dword [ebp - 0x2378]
push esi
cmp eax, dword [ebp - 0x238c]
jle 0x100087da
push 0
push edi
call fcn.100c6660
add esp, 0xc
jmp 0x100087f0
push ebx
push edi
call fcn.100c6090
dec dword [ebp - 0x238c]
add esp, 0xc
add ebx, dword [ebp - 0x2384]
mov eax, dword [ebp - 0x2374]
add edi, dword [ebp - 0x2384]
dec eax
mov dword [ebp - 0x2374], eax
test eax, eax
jns 0x100087c4
mov edi, dword [ebp - 0x2268]
mov ecx, dword [ebp - 0x2380]
mov ecx, dword [ecx + 0x17c]
mov eax, esi
mov edx, ecx
imul eax, edi
sub dword [ebp - 0x2378], eax
imul edx, esi
sub dword [ebp - 0x2370], edx
dec dword [ebp - 0x2390]
jne 0x10008790
mov eax, dword [ebp - 0x2380]
mov eax, dword [eax + 0x17c]
imul eax, dword [ebp - 0x237c]
xor edx, edx
div edi
mov ecx, dword [ebp - 0x2394]
mov dword [ecx], eax
jmp 0x1000886a
mov edx, dword [ebp - 0x2394]
mov eax, dword [ebp - 0x237c]
mov dword [edx], eax
mov eax, dword [ebp - 0x2388]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100c5f50
mov esp, ebp
pop ebp
ret 0xc