Function at 0x4077a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.004081e0
mov edi, edx
mov dword [esp + 0xc], ecx
mov ebx, dword [esp + 0x15c8]
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.00408350
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x14], edi
je 0x40786e
test esi, esi
mov ecx, esi
jle 0x407fb6
xor eax, eax
cmp ecx, 1
je 0x407838
mov ecx, dword [esp + 0x15c4]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0xc]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x2c]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x2c]
add eax, 2
cmp ecx, eax
jne 0x407820
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x407fb6
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0xc]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c4]
inc dword [esp + eax*4 + 0x2c]
jmp 0x407fb6
lea ebx, [edi + edi*8]
mov ebp, ebx
shl ebp, 6
test esi, esi
mov dword [esp + 0x20], ebp
jle 0x40796b
cmp esi, 1
jne 0x407b99
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c4]
test cl, 1
je 0x4078c5
mov ecx, dword [esp + 0xc]
add ecx, ebp
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4078c5
mov edx, edi
mov word [esp + edi*4 + 0xb0], cx
mov word [esp + edi*4 + 0xb2], ax
inc edx
mov edi, edx
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.00408350
add esp, 0xc
test edi, edi
sete byte [esp + 7]
je 0x407982
mov ecx, edi
xor eax, eax
cmp edi, 1
je 0x40793f
mov ecx, edi
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x530]
shr edx, 8
inc dword [esp + edx*4 + 0x930]
movzx edx, word [esp + eax*4 + 0xb4]
movzx esi, dl
inc dword [esp + esi*4 + 0x530]
shr edx, 8
inc dword [esp + edx*4 + 0x930]
add eax, 2
cmp ecx, eax
jne 0x407900
mov edx, edi
test dl, 1
je 0x407962
movzx eax, word [esp + eax*4 + 0xb0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x530]
shr eax, 8
inc dword [esp + eax*4 + 0x930]
mov eax, dword [esp + 0x930]
jmp 0x40798b
lea eax, [esp + 0x530]
push 0x800
push 0
push eax
call fcn.00408350
add esp, 0xc
xor edx, edx
mov byte [esp + 7], 1
xor eax, eax
mov dword [esp + 0x24], ebx
xor ecx, ecx
cmp eax, edx
setne cl
inc ecx
mov dword [esp + 0x28], ecx
lea eax, [edx - 1]
mov dword [esp + 0x18], eax
mov dword [esp], edx
and edx, 0xfffffffe
lea eax, [esp + 0xb0]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x1130]
xor ecx, ecx
xor esi, esi
mov dword [esp + 8], edx
jmp 0x4079e4
mov esi, dword [esp + 0x1c]
inc esi
add ecx, 8
mov eax, edi
cmp esi, dword [esp + 0x28]
je 0x407ace
mov edi, dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], esi
mov eax, esi
shl eax, 0xa
add eax, esp
add eax, 0x530
xor ebp, ebp
xor edx, edx
mov dword [esp + edx*4 + 0xd30], ebp
add ebp, dword [eax + edx*4]
mov ebx, edx
and ebx, 1
xor edx, 1
lea edx, [edx + ebx*2]
cmp edx, 0x100
jb 0x407a00
cmp byte [esp + 7], 0
jne 0x4079d0
cmp dword [esp + 0x18], 0
je 0x407a99
xor eax, eax
mov esi, dword [esp + 0x10]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [edi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xd30]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xd30], ebp
mov edx, dword [edi + eax*4]
mov dword [esi + ebx*4], edx
movzx edx, word [edi + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xd30]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xd30], ebp
mov edx, dword [edi + eax*4 + 4]
mov dword [esi + ebx*4], edx
mov edx, dword [esp + 8]
add eax, 2
cmp edx, eax
jne 0x407a40
test byte [esp], 1
je 0x4079d0
jmp 0x407aa5
xor eax, eax
test byte [esp], 1
je 0x4079d0
movzx edx, word [edi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xd30]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0xd30], ebp
mov eax, dword [edi + eax*4]
mov esi, dword [esp + 0x10]
mov dword [esi + ebx*4], eax
jmp 0x4079d0
cmp dword [esp], 0
mov ebx, dword [esp + 0x15c8]
mov esi, dword [esp + 0x10]
je 0x407ea0
mov edx, dword [esp]
cmp edx, 1
jne 0x407af5
mov word [esi], 1
jmp 0x407d8c
movzx eax, word [esi + 4]
add word [esi], ax
cmp edx, 3
jl 0x407c05
mov eax, 2
mov ecx, 2
sub ecx, edx
mov dword [esp + 8], ecx
xor edx, edx
mov edi, 1
jmp 0x407b4d
movzx ebx, word [esi + eax*4]
movzx ebp, word [esi + edi*4]
inc eax
mov ecx, ebp
and ecx, ebx
xor ebp, ebx
lea ecx, [ecx*2]
add ecx, ebp
mov word [esi + edi*4], cx
mov ecx, dword [esp + 8]
add ecx, edi
inc ecx
inc edi
cmp ecx, 1
je 0x407c14
movzx ebx, word [esi + edx*4]
cmp eax, dword [esp]
jge 0x407b5f
movzx ebp, word [esi + eax*4]
cmp bx, bp
jae 0x407b80
mov word [esi + edi*4], bx
mov word [esi + edx*4], di
inc edx
cmp eax, dword [esp]
jge 0x407b8a
cmp edx, edi
jge 0x407b20
movzx ebp, word [esi + edx*4]
movzx ebx, word [esi + eax*4]
cmp bp, bx
jae 0x407b24
jmp 0x407b8e
inc eax
mov word [esi + edi*4], bp
cmp eax, dword [esp]
jl 0x407b6d
movzx ebp, word [esi + edx*4]
add word [esi + edi*4], bp
mov word [esi + edx*4], di
inc edx
jmp 0x407b3c
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0xc]
lea edx, [eax + ebp]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x407bcb
add eax, 2
cmp ecx, eax
je 0x40788f
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x407be6
mov word [esp + edi*4 + 0xb0], si
mov word [esp + edi*4 + 0xb2], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x407bc0
mov word [esp + edi*4 + 0xb0], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0xb2], si
inc edi
jmp 0x407bc0
lea ecx, [edx - 2]
mov word [esi + edx*4 - 8], 0
jmp 0x407ca1
mov ecx, dword [esp]
mov word [esi + ecx*4 - 8], 0
lea edx, [ecx - 3]
and ecx, 3
xor ecx, 2
mov eax, edx
je 0x407c41
mov eax, edx
nop
nop
nop
movzx edi, word [esi + eax*4]
movzx edi, word [esi + edi*4]
inc edi
mov word [esi + eax*4], di
dec eax
dec ecx
jne 0x407c30
mov ecx, dword [esp]
add ecx, 0xfffffffe
cmp edx, 3
mov ebx, dword [esp + 0x15c8]
jb 0x407ca1
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esi + eax*4 - 4]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 4], dx
movzx edx, word [esi + eax*4 - 8]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 8], dx
movzx edx, word [esi + eax*4 - 0xc]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 0xc], dx
movzx edx, word [esi + eax*4 - 0x10]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 0x10], dx
add eax, 0xfffffffc
jne 0x407c60
mov edi, 1
xor edx, edx
mov eax, dword [esp + 0x18]
jmp 0x407cc0
lea edi, [ebp*2]
inc edx
test ebp, ebp
jle 0x407d82
test ecx, ecx
mov dword [esp + 8], edi
js 0x407cf0
lea ebp, [ecx + 1]
xor edi, edi
nop
nop
nop
movzx ebx, word [esi + ecx*4]
cmp edx, ebx
jne 0x407d00
inc edi
dec ecx
cmp ebp, edi
jne 0x407cd0
mov ecx, 0xffffffff
jmp 0x407d02
xor ebp, ebp
sub edi, ebp
jle 0x407cb0
jmp 0x407d11
mov ebp, edi
mov ebx, dword [esp + 0x15c8]
mov edi, dword [esp + 8]
sub edi, ebp
jle 0x407cb0
and edi, 3
je 0x407d3a
mov dword [esp + 0x1c], ebp
lea ebp, [esi + eax*4]
xor ebx, ebx
nop
mov word [ebp], dx
inc ebx
add ebp, 0xfffffffc
cmp edi, ebx
jne 0x407d20
mov edi, dword [esp + 8]
sub edi, ebx
sub eax, ebx
mov ebp, dword [esp + 0x1c]
jmp 0x407d3e
mov edi, dword [esp + 8]
mov ebx, ebp
sub ebx, dword [esp + 8]
cmp ebx, 0xfffffffc
mov ebx, dword [esp + 0x15c8]
ja 0x407cb0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [esi + eax*4], dx
mov word [esi + eax*4 - 4], dx
mov word [esi + eax*4 - 8], dx
mov word [esi + eax*4 - 0xc], dx
add eax, 0xfffffffc
add edi, 0xfffffffc
cmp edi, ebp
jg 0x407d60
jmp 0x407cb0
cmp dword [esp], 0
jle 0x407ea0
mov eax, dword [esp]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x18], 3
jb 0x407dda
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [esi + ecx*4]
inc dword [esp + edi*4 + 0x2c]
movzx edi, word [esi + ecx*4 + 4]
inc dword [esp + edi*4 + 0x2c]
movzx edi, word [esi + ecx*4 + 8]
inc dword [esp + edi*4 + 0x2c]
movzx edi, word [esi + ecx*4 + 0xc]
inc dword [esp + edi*4 + 0x2c]
add ecx, 4
cmp edx, ecx
jne 0x407db0
test eax, eax
je 0x407dfd
lea ecx, [esi + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ecx + edx*4]
inc dword [esp + edi*4 + 0x2c]
inc edx
cmp eax, edx
jne 0x407df0
cmp dword [esp], 2
jl 0x407ea0
cmp ebx, 0x20
jge 0x407e70
mov eax, dword [esp + ebx*4 + 0x2c]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x407e2c
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
inc ecx
mov dword [esp + ebx*4 + 0x2c], eax
dec edx
jne 0x407e20
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x407e68
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + ebx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x3c]
add ecx, 4
mov dword [esp + ebx*4 + 0x2c], eax
cmp ecx, 0x20
jne 0x407e40
test ebx, ebx
jle 0x4080fd
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + edx*4 + 0x28]
shl edi, cl
add eax, edi
dec edx
inc ecx
cmp edx, 1
ja 0x407e80
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x408108
mov ebp, dword [esp + 0x24]
shl ebp, 5
mov edi, dword [esp + 0xc]
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408350
add esp, 0xc
mov eax, dword [esp + 0x20]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408350
add esp, 0xc
test ebx, ebx
jle 0x407faf
add esi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0xc]
jmp 0x407f13
mov edi, dword [esp]
mov dword [esp], edi
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x407faf
mov ecx, dword [esp + eax*4 + 0x2c]
test ecx, ecx
jle 0x407f00
mov edx, ecx
and edx, 3
je 0x407f60
mov dword [esp + 8], ecx
mov ecx, dword [esp]
lea ebx, [esi + ecx*4]
xor edi, edi
nop
nop
mov ecx, ebp
movzx ebp, word [ebx]
mov byte [ebp + ecx + 0x8f12], al
mov ebp, ecx
inc edi
add ebx, 0xfffffffc
cmp edx, edi
jne 0x407f30
sub dword [esp], edi
mov ecx, dword [esp + 8]
mov edx, ecx
sub edx, edi
mov ebx, dword [esp + 0x15c8]
jmp 0x407f62
mov edx, ecx
cmp ecx, 4
mov edi, dword [esp]
jb 0x407f03
dec edx
nop
nop
nop
nop
nop
movzx ecx, word [esi + edi*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + edi*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + edi*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + edi*4 - 0xc]
add edi, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x407f70
jmp 0x407f03
mov ecx, dword [esp + 0x15c4]
mov dword [esp + 0x534], 0
cmp ebx, 2
jl 0x40801d
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x407fd7
xor eax, eax
mov edx, 2
jmp 0x408004
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x538], eax
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x53c], eax
add edx, 2
cmp ebx, edx
jne 0x407fe0
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c4]
je 0x40801d
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x530], eax
test ecx, ecx
jle 0x4080f2
xor eax, eax
mov edx, dword [esp + 0x14]
lea edi, [edx + edx*8]
mov edx, edi
shl edx, 5
mov esi, dword [esp + 0xc]
add edx, esi
shl edi, 6
add edi, esi
mov dword [esp + 8], edi
jmp 0x40806c
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c4]
inc eax
cmp eax, ecx
je 0x4080f2
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x408063
mov ecx, dword [esp + ebx*4 + 0x530]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x530], edi
xor edi, edi
cmp bl, 4
jb 0x4080cf
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
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 0x4080a0
and ebx, 3
je 0x408050
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 0x4080e0
jmp 0x408050
add esp, 0x15b0
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
lea ecx, [ebx + ebx]
jmp 0x408135
dec ebp
mov dword [esp + edi*2 + 0x2c], ebp
and edi, 2
xor ebx, 1
lea ebx, [esp + ebx*4]
add ebx, 0x2c
add dword [ebx + edi*4], 2
dec eax
cmp eax, edx
mov ebx, dword [esp + 0x15c8]
je 0x407ea0
dec dword [esp + ebx*4 + 0x2c]
mov edi, ecx
nop
nop
nop
nop
nop
cmp ebx, 2
jl 0x408125
dec ebx
mov ebp, dword [esp + edi*2 + 0x28]
add edi, 0xfffffffe
test ebp, ebp
je 0x408140
jmp 0x408110