Function at 0x407b00
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.004084a0
mov edi, edx
mov dword [esp + 0x10], ecx
mov ebx, dword [esp + 0x15c4]
mov esi, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.00408550
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0x18], edi
je 0x407bce
test esi, esi
mov ecx, esi
jle 0x4082e6
xor eax, eax
cmp ecx, 1
je 0x407b98
mov ecx, dword [esp + 0x15c0]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0x10]
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 0x407b80
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x4082e6
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x10]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c0]
inc dword [esp + eax*4 + 0x28]
jmp 0x4082e6
lea eax, [edi + edi*8]
mov dword [esp + 0x14], eax
mov ebx, eax
shl ebx, 6
test esi, esi
mov dword [esp + 0x1c], ebx
jle 0x407ccb
cmp esi, 1
jne 0x407eaf
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x407c29
mov ecx, dword [esp + 0x10]
add ecx, ebx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x407c29
mov edx, edi
mov word [esp + edi*4 + 0xac], cx
mov word [esp + edi*4 + 0xae], ax
inc edx
mov edi, edx
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.00408550
add esp, 0xc
test edi, edi
sete byte [esp + 7]
je 0x407ce2
mov ecx, edi
xor eax, eax
cmp edi, 1
je 0x407c9f
mov ecx, edi
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xac]
movzx esi, dl
inc dword [esp + esi*4 + 0x52c]
shr edx, 8
inc dword [esp + edx*4 + 0x92c]
movzx edx, word [esp + eax*4 + 0xb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x52c]
shr edx, 8
inc dword [esp + edx*4 + 0x92c]
add eax, 2
cmp ecx, eax
jne 0x407c60
mov edx, edi
test dl, 1
je 0x407cc2
movzx eax, word [esp + eax*4 + 0xac]
movzx ecx, al
inc dword [esp + ecx*4 + 0x52c]
shr eax, 8
inc dword [esp + eax*4 + 0x92c]
mov eax, dword [esp + 0x92c]
jmp 0x407ceb
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.00408550
add esp, 0xc
xor edx, edx
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
mov dword [esp], edx
cmp eax, edx
setne cl
inc ecx
mov dword [esp + 0x20], ecx
lea edi, [esp + 0xac]
lea eax, [esp + 0x112c]
xor ecx, ecx
lea esi, [esp + 0x52c]
xor edx, edx
jmp 0x407d42
mov edx, dword [esp + 0xc]
inc edx
add ecx, 8
mov esi, dword [esp + 0x24]
add esi, 0x400
mov eax, edi
cmp edx, dword [esp + 0x20]
mov edi, dword [esp + 8]
je 0x407ded
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov edx, 3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xd20], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xd24], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xd28], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xd2c], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x407d60
mov dword [esp + 0x24], esi
cmp byte [esp + 7], 0
jne 0x407d20
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [edi + edx*4]
shr eax, cl
movzx eax, al
mov ebp, dword [esp + eax*4 + 0xd2c]
mov ebx, dword [edi + edx*4]
mov esi, edi
mov edi, dword [esp + 8]
mov dword [edi + ebp*4], ebx
mov edi, esi
mov ebx, ebp
and ebp, 1
xor ebx, 1
lea ebx, [ebx + ebp*2]
mov dword [esp + eax*4 + 0xd2c], ebx
mov eax, dword [esp]
inc edx
cmp eax, edx
jne 0x407db0
jmp 0x407d20
cmp dword [esp], 0
mov ebx, dword [esp + 0x15c4]
mov ebp, dword [esp + 0x14]
je 0x4081c2
mov edx, dword [esp]
cmp edx, 1
jne 0x407e14
mov word [edi], 1
jmp 0x4080a7
movzx eax, word [edi + 4]
add word [edi], ax
cmp edx, 3
jl 0x407f15
mov eax, 2
mov ecx, 2
sub ecx, edx
xor edx, edx
mov esi, 1
jmp 0x407e5b
inc eax
add word [ebx + esi*4], di
mov ebp, dword [esp + 0x14]
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
mov edi, dword [esp + 8]
je 0x407f24
movzx ebx, word [edi + edx*4]
cmp eax, dword [esp]
jge 0x407e6d
movzx ebp, word [edi + eax*4]
cmp bx, bp
jae 0x407e80
mov word [edi + esi*4], bx
mov word [edi + edx*4], si
inc edx
jmp 0x407e85
inc eax
mov word [edi + esi*4], bp
mov ebx, edi
cmp eax, dword [esp]
jge 0x407ea0
movzx edi, word [ebx + eax*4]
cmp edx, esi
jge 0x407e40
movzx ebp, word [ebx + edx*4]
cmp bp, di
jae 0x407e40
jmp 0x407ea4
movzx ebp, word [ebx + edx*4]
add word [ebx + esi*4], bp
mov word [ebx + edx*4], si
inc edx
jmp 0x407e45
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x10]
lea edx, [ebx + eax]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x407edb
add eax, 2
cmp ecx, eax
je 0x407bf3
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x407ef6
mov word [esp + edi*4 + 0xac], si
mov word [esp + edi*4 + 0xae], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x407ed0
mov word [esp + edi*4 + 0xac], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0xae], si
inc edi
jmp 0x407ed0
lea eax, [edx - 2]
mov word [edi + edx*4 - 8], 0
jmp 0x407fa4
mov eax, dword [esp]
mov word [edi + eax*4 - 8], 0
lea edx, [eax - 3]
and eax, 3
xor eax, 2
mov ecx, edx
je 0x407f51
mov ecx, edx
nop
nop
nop
movzx esi, word [edi + ecx*4]
movzx esi, word [edi + esi*4]
inc esi
mov word [edi + ecx*4], si
dec ecx
dec eax
jne 0x407f40
mov eax, dword [esp]
add eax, 0xfffffffe
cmp edx, 3
jb 0x407fa1
inc ecx
nop
nop
nop
movzx edx, word [edi + ecx*4 - 4]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + ecx*4 - 4], dx
movzx edx, word [edi + ecx*4 - 8]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + ecx*4 - 8], dx
movzx edx, word [edi + ecx*4 - 0xc]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + ecx*4 - 0xc], dx
movzx edx, word [edi + ecx*4 - 0x10]
movzx edx, word [edi + edx*4]
inc edx
mov word [edi + ecx*4 - 0x10], dx
add ecx, 0xfffffffc
jne 0x407f60
mov edx, dword [esp]
lea ecx, [edx - 1]
mov esi, 1
xor edx, edx
jmp 0x407fd6
mov esi, ebx
and esi, 2
mov edi, ebx
or ebx, 2
imul ebx, esi
xor esi, 2
and edi, 0x7ffffffd
imul edi, esi
add ebx, edi
inc edx
mov esi, ebx
test ebx, ebx
jle 0x408092
test eax, eax
mov dword [esp + 0xc], esi
js 0x408010
lea ebx, [eax + 1]
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + 8]
movzx esi, word [esi + eax*4]
cmp edx, esi
jne 0x408020
dec eax
inc edi
cmp ebx, edi
jne 0x407ff0
mov eax, 0xffffffff
jmp 0x408022
xor ebx, ebx
jmp 0x408026
mov ebx, edi
mov esi, dword [esp + 0xc]
mov edi, esi
sub edi, ebx
jle 0x407fb0
and edi, 3
je 0x40805a
mov esi, dword [esp + 8]
lea ebp, [esi + ecx*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
mov word [ebp], dx
inc esi
add ebp, 0xfffffffc
cmp edi, esi
jne 0x408040
mov edi, dword [esp + 0xc]
sub edi, esi
sub ecx, esi
mov ebp, dword [esp + 0x14]
jmp 0x40805c
mov edi, esi
mov esi, ebx
sub esi, dword [esp + 0xc]
cmp esi, 0xfffffffc
mov esi, dword [esp + 8]
ja 0x407fb0
nop
mov word [esi + ecx*4], dx
mov word [esi + ecx*4 - 4], dx
mov word [esi + ecx*4 - 8], dx
mov word [esi + ecx*4 - 0xc], dx
add edi, 0xfffffffc
add ecx, 0xfffffffc
cmp edi, ebx
jg 0x408070
jmp 0x407fb0
cmp dword [esp], 0
mov edi, dword [esp + 8]
mov ebx, dword [esp + 0x15c4]
jle 0x4081c2
mov eax, dword [esp]
lea edx, [eax - 1]
and eax, 3
xor ecx, ecx
cmp edx, 3
jb 0x4080ea
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x28]
add ecx, 4
cmp edx, ecx
jne 0x4080c0
test eax, eax
je 0x40810d
lea ecx, [edi + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x28]
inc edx
cmp eax, edx
jne 0x408100
cmp dword [esp], 2
jl 0x4081c2
cmp ebx, 0x20
jge 0x40817e
mov ecx, dword [esp + ebx*4 + 0x28]
test bl, 1
jne 0x408129
mov eax, ebx
jmp 0x40813d
lea eax, [ebx + 1]
mov edx, dword [esp + ebx*4 + 0x2c]
mov esi, edx
and esi, ecx
xor edx, ecx
lea ecx, [edx + esi*2]
mov dword [esp + ebx*4 + 0x28], ecx
cmp ebx, 0x1f
je 0x40817a
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp + eax*4 + 0x2c]
mov esi, edx
and esi, ecx
xor edx, ecx
lea ecx, [edx + esi*2]
mov dword [esp + ebx*4 + 0x28], ecx
mov edx, dword [esp + eax*4 + 0x30]
add eax, 2
mov esi, edx
and esi, ecx
xor edx, ecx
lea ecx, [edx + esi*2]
mov dword [esp + ebx*4 + 0x28], ecx
cmp eax, 0x20
jne 0x408150
test ebx, ebx
jle 0x4081b2
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
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 0x408190
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x408405
jmp 0x4081c2
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x408405
shl ebp, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408550
add esp, 0xc
mov eax, dword [esp + 0x1c]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408550
add esp, 0xc
test ebx, ebx
mov edx, dword [esp]
jle 0x4082df
lea eax, [ebx + 1]
mov dword [esp + 0xc], eax
cmp eax, 3
jge 0x40821b
mov dword [esp + 0xc], 2
add edi, 0xfffffffe
mov ecx, 1
add ebp, dword [esp + 0x10]
mov dword [esp + 8], edi
jmp 0x40823e
mov edx, dword [esp]
inc ecx
cmp ecx, dword [esp + 0xc]
je 0x4082df
mov dword [esp], edx
mov edx, dword [esp + ecx*4 + 0x28]
test edx, edx
jle 0x408230
mov esi, edx
and esi, 3
je 0x408290
mov eax, dword [esp]
lea eax, [edi + eax*4]
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [eax]
mov byte [ebx + ebp + 0x8f12], cl
inc edi
add eax, 0xfffffffc
cmp esi, edi
jne 0x408260
sub dword [esp], edi
mov esi, edx
sub esi, edi
mov ebx, dword [esp + 0x15c4]
mov edi, dword [esp + 8]
jmp 0x408292
mov esi, edx
cmp edx, 4
mov edx, dword [esp]
jb 0x408233
dec esi
nop
nop
nop
nop
nop
movzx eax, word [edi + edx*4]
mov byte [eax + ebp + 0x8f12], cl
movzx eax, word [edi + edx*4 - 4]
mov byte [eax + ebp + 0x8f12], cl
movzx eax, word [edi + edx*4 - 8]
mov byte [eax + ebp + 0x8f12], cl
movzx eax, word [edi + edx*4 - 0xc]
add edx, 0xfffffffc
mov byte [eax + ebp + 0x8f12], cl
add esi, 0xfffffffc
cmp esi, 0xfffffffe
jb 0x4082a0
jmp 0x408233
mov ecx, dword [esp + 0x15c0]
mov dword [esp + 0x530], 0
cmp ebx, 2
jl 0x40834d
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x408307
xor eax, eax
mov edx, 2
jmp 0x408334
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x534], eax
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x538], eax
add edx, 2
cmp ebx, edx
jne 0x408310
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c0]
je 0x40834d
add eax, dword [esp + edx*4 + 0x24]
add eax, eax
mov dword [esp + edx*4 + 0x52c], eax
test ecx, ecx
jle 0x4083fa
xor eax, eax
mov edx, dword [esp + 0x18]
lea esi, [edx + edx*8]
mov edi, esi
shl edi, 5
mov edx, dword [esp + 0x10]
add edi, edx
mov dword [esp + 8], edi
shl esi, 6
add esi, edx
mov dword [esp], esi
jmp 0x408397
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c0]
inc eax
cmp eax, ecx
je 0x4083fa
mov edx, dword [esp + 8]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x408392
mov edx, dword [esp + ebx*4 + 0x52c]
lea ecx, [edx + 1]
mov dword [esp + ebx*4 + 0x52c], ecx
xor edi, edi
cmp ebx, 1
je 0x4083ed
mov ebp, ebx
and ebp, 0xfffffffe
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, edx
shr edi, 1
mov esi, edx
and esi, 1
add esi, esi
lea ecx, [esi + ecx*4]
and edi, 1
or edi, ecx
shr edx, 2
mov ecx, edi
add ebp, 0xfffffffe
jne 0x4083d0
test bl, 1
je 0x408380
and edx, 1
lea edi, [edx + edi*2]
jmp 0x408380
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
cmp ecx, 2
jl 0x408428
mov esi, dword [esp + ecx*4 + 0x24]
dec ecx
test esi, esi
je 0x408410
dec esi
mov dword [esp + ecx*4 + 0x28], esi
add dword [esp + ecx*4 + 0x2c], 2
dec eax
cmp eax, edx
jne 0x408405
jmp 0x4081c2