Function at 0x4076f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.00408130
mov edi, edx
mov dword [esp + 0x14], ecx
mov ebx, dword [esp + 0x15c4]
mov esi, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.00408410
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0x20], edi
je 0x4077be
test esi, esi
mov ecx, esi
jle 0x407f26
xor eax, eax
cmp ecx, 1
je 0x407788
mov ecx, dword [esp + 0x15c0]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x20]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0x14]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x28]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x28]
add eax, 2
cmp ecx, eax
jne 0x407770
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x407f26
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x14]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c0]
inc dword [esp + eax*4 + 0x28]
jmp 0x407f26
lea ebp, [edi + edi*8]
mov eax, ebp
shl eax, 6
mov dword [esp + 0x1c], eax
test esi, esi
jle 0x40787e
cmp esi, 1
jne 0x407add
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x407819
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x407819
mov edx, edi
mov word [esp + edi*4 + 0x4ac], cx
mov word [esp + edi*4 + 0x4ae], ax
inc edx
mov edi, edx
lea eax, [esp + 0x92c]
push 0x800
push 0
push eax
call fcn.00408410
add esp, 0xc
mov eax, edi
test edi, edi
sete byte [esp + 0xc]
je 0x407895
xor eax, eax
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4ac]
movzx edx, cl
inc dword [esp + edx*4 + 0x92c]
shr ecx, 8
mov edx, dword [esp + ecx*4 + 0xd2c]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov dword [esp + ecx*4 + 0xd2c], edx
inc eax
cmp edi, eax
jne 0x407840
mov ecx, edi
mov eax, dword [esp + 0xd2c]
jmp 0x40789e
lea eax, [esp + 0x92c]
push 0x800
push 0
push eax
call fcn.00408410
add esp, 0xc
xor ecx, ecx
mov byte [esp + 0xc], 1
xor eax, eax
xor edx, edx
cmp eax, ecx
setne dl
inc edx
mov dword [esp + 0x24], edx
mov dword [esp + 4], ecx
and ecx, 0xfffffffe
mov dword [esp + 8], ecx
lea edi, [esp + 0x4ac]
lea eax, [esp + 0x112c]
xor ecx, ecx
lea esi, [esp + 0x92c]
xor edx, edx
mov dword [esp + 0x18], ebp
jmp 0x4078fb
inc eax
add ecx, 8
add esi, 0x400
mov edx, eax
mov eax, edi
cmp edx, dword [esp + 0x24]
mov edi, dword [esp]
je 0x407a0b
mov dword [esp + 0x10], edx
mov dword [esp], eax
mov edx, 3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xa0], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xa4], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xa8], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xac], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x407910
cmp byte [esp + 0xc], 0
mov eax, dword [esp + 0x10]
jne 0x4078e0
xor edx, edx
cmp dword [esp + 4], 1
mov ebp, edi
je 0x4079b8
xor edx, edx
nop
nop
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov edi, ebp
mov ebp, dword [esp + eax*4 + 0xac]
lea ebx, [ebp + 1]
mov dword [esp + eax*4 + 0xac], ebx
mov eax, dword [edi + edx*4]
mov ebx, dword [esp]
mov dword [ebx + ebp*4], eax
movzx eax, word [edi + edx*4 + 4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xac]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xac], ebp
mov ebp, edi
mov eax, dword [edi + edx*4 + 4]
mov edi, dword [esp]
mov dword [edi + ebx*4], eax
mov edi, dword [esp + 8]
add edx, 2
cmp edi, edx
jne 0x407960
test byte [esp + 4], 1
mov ebx, dword [esp + 0x15c4]
mov edi, ebp
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
je 0x4078e0
movzx eax, word [edi + edx*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xac]
lea ebp, [ebx + 1]
mov dword [esp + eax*4 + 0xac], ebp
mov ebp, dword [esp + 0x18]
mov eax, dword [edi + edx*4]
mov edx, dword [esp]
mov dword [edx + ebx*4], eax
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x15c4]
jmp 0x4078e0
cmp dword [esp + 4], 0
je 0x407e12
mov edx, dword [esp + 4]
cmp edx, 1
jne 0x407a29
mov word [edi], 1
jmp 0x407d31
movzx eax, word [edi + 4]
add word [edi], ax
lea eax, [edx - 1]
cmp eax, 2
mov dword [esp + 0xc], eax
jl 0x407b45
mov ecx, 2
mov eax, 2
sub eax, edx
mov dword [esp + 8], eax
xor esi, esi
mov edi, 1
jmp 0x407a7a
inc ecx
add word [ebx + edi*4], ax
mov eax, dword [esp + 8]
add eax, edi
inc eax
inc edi
cmp eax, 1
mov edx, dword [esp + 4]
je 0x407b54
mov ebx, dword [esp]
movzx eax, word [ebx + esi*4]
cmp ecx, edx
jge 0x407a8e
movzx edx, word [ebx + ecx*4]
cmp ax, dx
jae 0x407ac0
mov word [ebx + edi*4], ax
mov word [ebx + esi*4], di
inc esi
cmp ecx, dword [esp + 4]
jge 0x407acb
mov ebx, dword [esp]
movzx eax, word [ebx + ecx*4]
cmp esi, edi
jge 0x407a60
movzx edx, word [ebx + esi*4]
cmp dx, ax
jae 0x407a60
jmp 0x407ad2
inc ecx
mov word [ebx + edi*4], dx
cmp ecx, dword [esp + 4]
jl 0x407a9d
mov ebx, dword [esp]
movzx edx, word [ebx + esi*4]
add word [ebx + edi*4], dx
mov word [ebx + esi*4], di
inc esi
jmp 0x407a65
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
add edx, eax
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x407b0b
add eax, 2
cmp ecx, eax
je 0x4077df
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x407b26
mov word [esp + edi*4 + 0x4ac], si
mov word [esp + edi*4 + 0x4ae], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x407b00
mov word [esp + edi*4 + 0x4ac], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0x4ae], si
inc edi
jmp 0x407b00
lea ecx, [edx - 2]
mov word [edi + edx*4 - 8], 0
jmp 0x407c01
lea ecx, [edx - 2]
mov edi, dword [esp]
mov word [edi + edx*4 - 8], 0
cmp edx, 3
jl 0x407bad
lea eax, [edx - 3]
mov esi, edi
mov edi, edx
and edi, 3
xor edi, 2
mov dword [esp + 8], eax
mov edx, eax
mov ebx, dword [esp + 0x15c4]
je 0x407ba1
mov edx, dword [esp + 8]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [esi + edx*4]
movzx eax, word [esi + eax*4]
inc eax
mov word [esi + edx*4], ax
dec edx
dec edi
jne 0x407b90
cmp dword [esp + 8], 3
jae 0x407bb6
mov edi, dword [esp]
jmp 0x407c01
mov ebx, dword [esp + 0x15c4]
jmp 0x407c01
inc edx
mov edi, dword [esp]
nop
nop
nop
nop
nop
nop
movzx eax, word [edi + edx*4 - 4]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + edx*4 - 4], ax
movzx eax, word [edi + edx*4 - 8]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + edx*4 - 8], ax
movzx eax, word [edi + edx*4 - 0xc]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + edx*4 - 0xc], ax
movzx eax, word [edi + edx*4 - 0x10]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + edx*4 - 0x10], ax
add edx, 0xfffffffc
jne 0x407bc0
mov dword [esp + 0x10], 1
xor edx, edx
jmp 0x407c31
mov eax, edx
xor eax, 1
and edx, 1
lea edx, [eax + edx*2]
mov eax, dword [esp + 8]
lea esi, [eax + eax]
mov dword [esp + 0x10], esi
test eax, eax
mov edi, dword [esp]
jle 0x407d26
test ecx, ecx
js 0x407c60
lea ebp, [ecx + 1]
xor eax, eax
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
cmp edx, esi
jne 0x407c70
inc eax
dec ecx
cmp ebp, eax
jne 0x407c40
mov ecx, 0xffffffff
mov ebx, dword [esp + 0x15c4]
mov eax, ebp
jmp 0x407c77
xor eax, eax
jmp 0x407c7b
mov ebx, dword [esp + 0x15c4]
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
sub edi, eax
mov dword [esp + 8], eax
jle 0x407c10
and edi, 3
je 0x407cc5
mov esi, dword [esp + 0xc]
add esi, esi
xor eax, eax
mov ebx, dword [esp]
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx + esi*2], dx
inc eax
add esi, 0xfffffffe
cmp edi, eax
jne 0x407ca0
mov esi, dword [esp + 0x10]
mov edi, esi
sub edi, eax
sub dword [esp + 0xc], eax
mov ebx, dword [esp + 0x15c4]
mov eax, dword [esp + 8]
jmp 0x407ccb
mov esi, dword [esp + 0x10]
mov edi, esi
sub eax, esi
cmp eax, 0xfffffffc
ja 0x407c10
mov esi, dword [esp + 0xc]
lea eax, [esi*2 - 2]
neg esi
mov ebx, esi
mov esi, dword [esp]
mov ebp, dword [esp + 8]
nop
nop
nop
nop
mov word [esi + eax*2 + 4], dx
mov word [esi + eax*2], dx
mov word [esi + eax*2 - 4], dx
mov word [esi + eax*2 - 8], dx
add edi, 0xfffffffc
add ebx, 4
add eax, 0xfffffff8
cmp edi, ebp
jg 0x407cf0
neg ebx
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x15c4]
mov ebp, dword [esp + 0x18]
jmp 0x407c10
cmp dword [esp + 4], 0
jle 0x407e12
xor eax, eax
mov edx, dword [esp + 4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + eax*4]
inc dword [esp + ecx*4 + 0x28]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, edx
jl 0x407d40
cmp edx, 2
jl 0x407e12
cmp ebx, 0x20
jge 0x407dcc
mov eax, dword [esp + ebx*4 + 0x28]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x407d8c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
inc ecx
mov dword [esp + ebx*4 + 0x28], eax
dec edx
jne 0x407d80
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x407dc8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
mov dword [esp + ebx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + ebx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + ebx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x38]
add ecx, 4
mov dword [esp + ebx*4 + 0x28], eax
cmp ecx, 0x20
jne 0x407da0
test ebx, ebx
jle 0x407e02
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x24]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x407de0
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x40808d
jmp 0x407e12
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x40808d
shl ebp, 5
mov esi, dword [esp + 0x14]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408410
add esp, 0xc
mov eax, dword [esp + 0x1c]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408410
add esp, 0xc
test ebx, ebx
jle 0x407f1f
add edi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0x14]
mov dword [esp], edi
jmp 0x407e85
mov esi, dword [esp + 4]
mov dword [esp + 4], esi
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x407f1f
mov ecx, dword [esp + eax*4 + 0x28]
test ecx, ecx
jle 0x407e70
mov edx, ecx
and edx, 3
je 0x407ed0
mov esi, dword [esp + 4]
lea edi, [edi + esi*4]
xor esi, esi
nop
nop
nop
movzx ebx, word [edi]
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x407ea0
sub dword [esp + 4], esi
mov edx, ecx
sub edx, esi
mov ebx, dword [esp + 0x15c4]
mov edi, dword [esp]
jmp 0x407ed2
mov edx, ecx
cmp ecx, 4
mov esi, dword [esp + 4]
jb 0x407e74
dec edx
nop
nop
nop
nop
movzx ecx, word [edi + esi*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 0xc]
add esi, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x407ee0
jmp 0x407e74
mov ecx, dword [esp + 0x15c0]
mov dword [esp + 0x930], 0
cmp ebx, 2
jl 0x407faf
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x407f47
xor edx, edx
mov eax, 2
jmp 0x407f86
mov ebx, ecx
and ebx, 0xfffffffe
xor edx, edx
xor eax, eax
mov edi, dword [esp + eax*4 + 0x2c]
mov esi, dword [esp + eax*4 + 0x30]
mov ebp, edi
and ebp, edx
xor edi, edx
add edi, edi
lea edx, [edi + ebp*4]
mov dword [esp + eax*4 + 0x934], edx
mov edi, esi
and edi, edx
xor esi, edx
add esi, esi
lea edx, [esi + edi*4]
mov dword [esp + eax*4 + 0x938], edx
add eax, 2
cmp ebx, eax
jne 0x407f50
add eax, 2
test cl, 1
mov ecx, dword [esp + 0x15c0]
je 0x407faf
mov ecx, dword [esp + eax*4 + 0x24]
mov esi, ecx
and esi, edx
xor ecx, edx
add ecx, ecx
lea ecx, [ecx + esi*4]
mov dword [esp + eax*4 + 0x92c], ecx
mov ecx, dword [esp + 0x15c0]
test ecx, ecx
jle 0x408082
xor eax, eax
mov edx, dword [esp + 0x20]
lea edi, [edx + edx*8]
mov edx, edi
shl edx, 5
mov esi, dword [esp + 0x14]
add edx, esi
shl edi, 6
add edi, esi
mov dword [esp], edi
jmp 0x407ffb
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c0]
inc eax
cmp eax, ecx
je 0x408082
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x407ff2
mov ecx, dword [esp + ebx*4 + 0x92c]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x92c], edi
xor edi, edi
cmp bl, 4
jb 0x40805f
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
shl esi, 2
lea esi, [esi + edi*8]
mov edi, ecx
and edi, 2
or edi, esi
mov esi, ecx
shr esi, 2
and esi, 1
or esi, edi
mov edi, ecx
shr edi, 3
and edi, 1
lea edi, [edi + esi*2]
shr ecx, 4
add ebp, 0xfffffffc
jne 0x408030
and ebx, 3
je 0x407fe0
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
lea edi, [esi + edi*2]
shr ecx, 1
dec ebx
jne 0x408070
jmp 0x407fe0
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret
dec dword [esp + ebx*4 + 0x28]
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x4080b8
mov esi, dword [esp + ecx*4 + 0x24]
dec ecx
test esi, esi
je 0x4080a0
dec esi
mov dword [esp + ecx*4 + 0x28], esi
add dword [esp + ecx*4 + 0x2c], 2
dec eax
cmp eax, edx
jne 0x40808d
jmp 0x407e12