Function at 0x1007d680
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x250
mov eax, dword [esp + 0x25c]
push ebx
push esi
push edi
mov eax, dword [eax*4 + 0x100f3b8c]
xor esi, esi
imul eax, dword [esp + 0x27c]
sar eax, 6
mov dword [esp + 0x24], eax
or eax, 0xffffffff
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x284]
mov edi, 0x1000
cmp eax, esi
mov word [esp + 0x10], si
mov word [esp + 0x12], si
mov dword [esp + 0x48], edi
mov dword [esp + 0x1c], esi
je 0x1007d716
mov ecx, dword [esp + 0x264]
push ecx
call dword [0x1019ee54]
imul eax, dword [esp + 0x284]
mov edx, 0x8000
add esp, 4
add eax, eax
mov ecx, edx
mov ebx, ecx
imul ebx, ecx
cmp ebx, eax
jbe 0x1007d702
xor ecx, edx
shr edx, 1
je 0x1007d70a
or ecx, edx
jmp 0x1007d6f7
lea eax, [ecx + 0x30]
shr eax, 6
mov dword [esp + 0x40], eax
jmp 0x1007d71a
mov dword [esp + 0x40], esi
mov eax, dword [esp + 0x274]
mov ecx, dword [esp + 0x26c]
mov edx, dword [esp + 0x260]
cmp eax, esi
mov dword [esp + 0x54], edi
jl 0x1007d754
xor edi, edi
mov di, word [ecx + eax*2]
cmp word [edx + edi*2], si
jne 0x1007d748
dec eax
jns 0x1007d737
jmp 0x1007d754
cmp eax, 3
mov dword [esp + 0x274], eax
jge 0x1007d760
mov eax, 3
mov dword [esp + 0x274], eax
cmp eax, esi
mov dword [esp + 0xc], esi
jl 0x1007de3f
push ebp
mov edx, dword [esp + 0x270]
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov cx, word [edx + eax*2]
mov edx, dword [esp + 0x274]
xor eax, eax
mov ax, word [edx + ecx*2]
mov edx, dword [esp + 0x268]
imul eax, dword [esp + 0x26c]
sar eax, 4
movsx ebx, word [edx + ecx*2]
lea edi, [eax - 1]
lea ebp, [eax + eax]
or edi, 1
lea eax, [edi + ebp]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x264]
movsx edx, word [eax + ecx*2]
mov eax, dword [esp + 0x288]
mov dword [esp + 0x34], edx
test eax, eax
je 0x1007d861
movsx esi, word [ecx*2 + 0x100f32d8]
mov eax, dword [esp + 0x44]
and eax, 0xffff
imul esi, eax
movsx eax, bx
cdq
xor eax, edx
add esi, 0x20
sub eax, edx
sar esi, 7
shl eax, 4
cmp esi, 0x10000
jb 0x1007d801
mov esi, 0xffff
cmp ax, si
ja 0x1007d80a
xor eax, eax
jmp 0x1007d80c
sub eax, esi
xor edx, edx
and eax, 0xffff
mov dx, word [ecx*2 + 0x100f33d8]
add edx, eax
xor eax, eax
mov ax, word [ecx*2 + 0x100f3358]
imul edx, eax
sar edx, 0x10
and edx, 0xffff
movsx eax, bx
mov esi, edx
imul esi, edx
mov edx, eax
imul edx, eax
sar esi, 4
mov eax, 0x66666667
lea edx, [esi + edx*4]
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, dword [esp + 0x28]
mov dword [esp + 0x50], edx
jmp 0x1007d871
mov eax, ebx
imul eax, ebx
imul eax, dword [esp + 0x28]
mov dword [esp + 0x50], eax
mov edx, eax
mov esi, dword [esp + 0x20]
mov dword [esp + 0x1c], 0xf0000000
add esi, edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x20], esi
lea esi, [edx + 1]
cmp esi, 3
jae 0x1007da20
mov edx, dword [esp + 0x10]
test ebx, ebx
lea ebp, [edx*4]
lea eax, [esp + ebp + 0x15e]
mov dword [esp + 0x34], eax
jge 0x1007d8ba
mov word [eax], 0xffff
mov eax, dword [esp + 0x24]
add ebx, eax
jmp 0x1007d8c7
mov word [eax], 1
mov eax, dword [esp + 0x24]
sub eax, ebx
mov ebx, eax
mov eax, dword [esp + 0x288]
test eax, eax
je 0x1007d960
movsx esi, word [ecx*2 + 0x100f32d8]
mov eax, dword [esp + 0x44]
and eax, 0xffff
imul esi, eax
movsx edi, bx
mov eax, edi
add esi, 0x20
cdq
xor eax, edx
sub eax, edx
sar esi, 7
shl eax, 4
cmp esi, 0x10000
jb 0x1007d90a
mov esi, 0xffff
cmp ax, si
ja 0x1007d913
xor eax, eax
jmp 0x1007d915
sub eax, esi
xor edx, edx
and eax, 0xffff
mov dx, word [ecx*2 + 0x100f33d8]
add edx, eax
xor eax, eax
mov ax, word [ecx*2 + 0x100f3358]
imul edx, eax
sar edx, 0x10
and edx, 0xffff
mov eax, 0x66666667
mov ecx, edx
imul ecx, edx
mov edx, edi
imul edx, edi
sar ecx, 4
lea ecx, [ecx + edx*4]
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
mov edi, edx
jmp 0x1007d965
mov edi, ebx
imul edi, ebx
imul edi, dword [esp + 0x28]
mov ecx, dword [esp + ebp + 0x58]
mov esi, dword [esp + 0x3c]
lea eax, [esp + ebp + 0x15c]
lea edx, [ecx + edi + 0x1800]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x10]
mov ecx, edx
mov word [eax], 1
sub ecx, esi
test ecx, ecx
jle 0x1007da05
sub edx, ecx
mov eax, 0x100f3ad8
dec eax
lea ebx, [esp + edx*4 + 0x5c]
mov edx, 0x100f39d8
sub edx, eax
lea ebp, [eax + ecx]
dec edx
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x24]
mov esi, dword [ebx]
xor eax, eax
add esi, edi
mov al, byte [edx + ebp]
xor edx, edx
mov dl, byte [ebp]
shl eax, 0xb
shl edx, 0xb
add eax, esi
add edx, esi
cmp eax, dword [esp + 0x1c]
jae 0x1007d9e1
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
mov word [eax], cx
cmp edx, dword [esp + 0x20]
jae 0x1007d9f8
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x10]
mov word [esp + 0x14], cx
mov dword [esp + 0x40], edx
dec ecx
add ebx, 4
dec ebp
test ecx, ecx
jg 0x1007d9b4
mov edx, dword [esp + 0x10]
cmp dword [esp + 0x40], edx
jne 0x1007ddc9
mov eax, dword [esp + 0x34]
mov cx, word [eax]
mov word [esp + 0x16], cx
jmp 0x1007ddc9
lea eax, [edx + 0x19]
cmp eax, 0x33
jae 0x1007dd68
mov eax, edx
imul eax, ebp
sub eax, ebx
cmp edx, 1
jle 0x1007daab
add eax, edi
lea esi, [edx - 1]
mov edi, eax
mov dword [esp + 0x24], esi
sub edi, ebp
cmp edx, 0x18
mov dword [esp + 0x18], edi
jg 0x1007da60
mov edi, dword [edx*4 + 0x100f3b14]
mov dword [esp + 0x2c], edi
mov edi, 0x100f34d8
jmp 0x1007da69
mov edi, 0x100f34d8
mov dword [esp + 0x2c], edi
cmp esi, 0x18
jg 0x1007da7b
mov ebx, dword [esi*4 + 0x100f3b14]
mov dword [esp + 0x48], ebx
jmp 0x1007da7f
mov dword [esp + 0x48], edi
cmp edx, 6
jg 0x1007da91
mov edx, dword [edx*4 + 0x100f3b74]
mov dword [esp + 0x30], edx
jmp 0x1007da95
mov dword [esp + 0x30], edi
cmp esi, 6
jg 0x1007db22
mov edx, dword [esi*4 + 0x100f3b74]
mov dword [esp + 0x38], edx
jmp 0x1007db26
sub eax, edi
cmp edx, 0xffffffe8
mov dword [esp + 0x24], esi
lea edi, [eax + ebp]
mov dword [esp + 0x18], edi
jl 0x1007dad3
mov edi, edx
not edi
mov edi, dword [edi*4 + 0x100f3b18]
mov dword [esp + 0x2c], edi
mov edi, 0x100f34d8
jmp 0x1007dadc
mov edi, 0x100f34d8
mov dword [esp + 0x2c], edi
cmp esi, 0xffffffe8
jl 0x1007daf2
mov ebx, esi
not ebx
mov ebx, dword [ebx*4 + 0x100f3b18]
mov dword [esp + 0x48], ebx
jmp 0x1007daf6
mov dword [esp + 0x48], edi
cmp edx, 0xfffffffa
jl 0x1007db0a
not edx
mov edx, dword [edx*4 + 0x100f3b78]
mov dword [esp + 0x30], edx
jmp 0x1007db0e
mov dword [esp + 0x30], edi
cmp esi, 0xfffffffa
jl 0x1007db22
not esi
mov edx, dword [esi*4 + 0x100f3b78]
mov dword [esp + 0x38], edx
jmp 0x1007db26
mov dword [esp + 0x38], edi
mov edx, dword [esp + 0x288]
test edx, edx
je 0x1007dc4b
mov ebx, dword [esp + 0x44]
movsx esi, word [ecx*2 + 0x100f32d8]
and ebx, 0xffff
imul esi, ebx
movsx edi, ax
mov eax, edi
add esi, 0x20
cdq
xor eax, edx
sub eax, edx
sar esi, 7
shl eax, 4
cmp esi, 0x10000
jb 0x1007db6a
mov esi, 0xffff
cmp ax, si
ja 0x1007db73
xor eax, eax
jmp 0x1007db75
sub eax, esi
xor edx, edx
and eax, 0xffff
mov dx, word [ecx*2 + 0x100f33d8]
add edx, eax
xor eax, eax
mov ax, word [ecx*2 + 0x100f3358]
imul edx, eax
sar edx, 0x10
and edx, 0xffff
mov eax, edx
imul eax, edx
mov edx, edi
imul edx, edi
sar eax, 4
movsx esi, word [ecx*2 + 0x100f32d8]
lea edx, [eax + edx*4]
mov eax, 0x66666667
imul edx
imul esi, ebx
movsx edi, word [esp + 0x18]
sar edx, 1
mov eax, edx
add esi, 0x20
shr eax, 0x1f
add edx, eax
mov eax, edi
mov ebp, edx
imul ebp, dword [esp + 0x28]
cdq
xor eax, edx
sub eax, edx
sar esi, 7
shl eax, 4
cmp esi, 0x10000
jb 0x1007dbf0
mov esi, 0xffff
cmp ax, si
ja 0x1007dbf9
xor eax, eax
jmp 0x1007dbfb
sub eax, esi
xor edx, edx
and eax, 0xffff
mov dx, word [ecx*2 + 0x100f33d8]
add edx, eax
xor eax, eax
mov ax, word [ecx*2 + 0x100f3358]
imul edx, eax
sar edx, 0x10
and edx, 0xffff
mov eax, 0x66666667
mov ecx, edx
imul ecx, edx
mov edx, edi
imul edx, edi
sar ecx, 4
lea ecx, [ecx + edx*4]
imul ecx
mov eax, edx
sar eax, 1
mov ecx, eax
shr ecx, 0x1f
add eax, ecx
imul eax, dword [esp + 0x28]
jmp 0x1007dc61
mov ebp, eax
mov ecx, dword [esp + 0x28]
imul ebp, eax
mov eax, dword [esp + 0x18]
imul ebp, ecx
imul eax, eax
imul eax, ecx
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x3c]
sub eax, ebp
sub esi, ecx
mov ebx, eax
test esi, esi
mov dword [esp + 0x54], ebx
jle 0x1007ddc9
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x48]
sub ecx, esi
lea eax, [edx - 1]
lea edx, [esp + ecx*4 + 0x5c]
mov ecx, dword [esp + 0x2c]
sub ecx, eax
lea edi, [eax + esi]
dec ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x30]
sub ecx, eax
dec ecx
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x38]
sub ecx, eax
dec ecx
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov edx, dword [eax]
mov eax, dword [esp + 0x2c]
add edx, ebp
mov cl, byte [eax + edi]
xor eax, eax
mov al, byte [edi]
shl eax, 0xb
shl ecx, 0xb
add eax, edx
add ecx, edx
add eax, ebx
cmp eax, ecx
jae 0x1007dce1
mov ebx, dword [esp + 0x24]
mov ecx, eax
jmp 0x1007dce5
mov ebx, dword [esp + 0x34]
cmp ecx, dword [esp + 0x1c]
jae 0x1007dd03
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], ecx
mov word [esp + eax*4 + 0x15c], si
mov word [esp + eax*4 + 0x15e], bx
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x38]
xor eax, eax
mov al, byte [ecx + edi]
xor ecx, ecx
mov cl, byte [ebx + edi]
mov ebx, dword [esp + 0x54]
shl ecx, 0xb
shl eax, 0xb
add ecx, edx
add eax, edx
add ecx, ebx
cmp ecx, eax
jae 0x1007dd31
mov eax, ecx
mov ecx, dword [esp + 0x24]
jmp 0x1007dd35
mov ecx, dword [esp + 0x34]
cmp eax, dword [esp + 0x20]
jae 0x1007dd51
mov edx, dword [esp + 0x10]
mov dword [esp + 0x20], eax
mov word [esp + 0x14], si
mov word [esp + 0x16], cx
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x18]
dec esi
add edx, 4
dec edi
test esi, esi
mov dword [esp + 0x18], edx
jg 0x1007dcb4
jmp 0x1007ddc9
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x3c]
mov ecx, edi
sub ecx, esi
test ecx, ecx
jle 0x1007ddc9
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
mov eax, edi
sub eax, ecx
lea ebx, [esp + eax*4 + 0x5c]
mov eax, dword [ebx]
add eax, 0xf000
cmp eax, esi
jae 0x1007dda5
mov esi, eax
mov word [esp + edi*4 + 0x15c], cx
mov word [esp + edi*4 + 0x15e], dx
cmp eax, ebp
jae 0x1007ddb9
mov ebp, eax
mov word [esp + 0x14], cx
mov word [esp + 0x16], dx
mov dword [esp + 0x40], edi
dec ecx
add ebx, 4
test ecx, ecx
jg 0x1007dd88
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x50]
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
lea edi, [esi + edx]
cmp eax, edi
mov dword [esp + ecx*4 + 0x5c], eax
jae 0x1007ddee
mov dword [esp + 0x4c], eax
mov dword [esp + 0x3c], ecx
jmp 0x1007de22
mov eax, dword [esp + 0x3c]
add edx, 0x800
cmp dword [esp + eax*4 + 0x5c], edx
jbe 0x1007de0b
mov ebx, dword [esp + eax*4 + 0x60]
inc eax
cmp ebx, edx
ja 0x1007ddfe
mov dword [esp + 0x3c], eax
cmp eax, ecx
jge 0x1007de1e
mov ebp, dword [esp + eax*4 + 0x5c]
add ebp, esi
mov dword [esp + eax*4 + 0x5c], ebp
inc eax
cmp eax, ecx
jl 0x1007de0f
mov dword [esp + 0x4c], edi
mov eax, dword [esp + 0x278]
inc ecx
cmp ecx, eax
mov dword [esp + 0x10], ecx
jle 0x1007d76d
mov edx, dword [esp + 0x40]
pop ebp
test edx, edx
jge 0x1007de50
mov eax, dword [esp + 0x278]
pop edi
pop esi
pop ebx
add esp, 0x250
ret
mov ebx, dword [esp + 0x260]
mov ecx, 0x20
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x26c]
mov ax, word [esp + 0x12]
xor ecx, ecx
mov cx, word [edi + edx*2]
mov word [ebx + ecx*2], ax
movsx ecx, word [esp + 0x10]
movsx eax, ax
sub edx, ecx
mov ecx, edx
cdq
mov esi, eax
xor esi, edx
sub esi, edx
test ecx, ecx
jl 0x1007deb7
mov ax, word [esp + ecx*4 + 0x15a]
xor edx, edx
mov dx, word [edi + ecx*2]
mov word [ebx + edx*2], ax
movsx eax, ax
cdq
xor eax, edx
sub eax, edx
add esi, eax
movsx eax, word [esp + ecx*4 + 0x158]
sub ecx, eax
jns 0x1007de8f
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x250
ret