Function at 0x407df0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15a8
call fcn.00408760
mov esi, edx
mov ebp, ecx
mov ebx, dword [esp + 0x15bc]
lea eax, [esp + 0x24]
push 0x84
push 0
push eax
call fcn.00408810
add esp, 0xc
cmp dword [esp + 0x15c4], 0
mov dword [esp + 0x14], esi
je 0x407e9e
test ebx, ebx
jle 0x40859c
xor eax, eax
cmp ebx, 1
je 0x407e78
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + ebp]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x24]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x24]
add eax, 2
cmp ecx, eax
jne 0x407e60
test bl, 1
je 0x40859c
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, ebp
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x24]
jmp 0x40859c
lea eax, [esi + esi*8]
mov dword [esp + 0x10], eax
shl eax, 6
test ebx, ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], eax
jle 0x407f99
cmp ebx, 1
jne 0x408169
xor eax, eax
xor ebp, ebp
test bl, 1
mov ebx, ebp
je 0x407ef6
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x407ef6
mov word [esp + ebx*4 + 0xa8], cx
mov word [esp + ebx*4 + 0xaa], ax
inc ebx
lea eax, [esp + 0x528]
push 0x800
push 0
push eax
call fcn.00408810
add esp, 0xc
test ebx, ebx
sete byte [esp + 0xc]
je 0x407fb0
xor eax, eax
cmp ebx, 1
je 0x407f6f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xa8]
movzx esi, dl
inc dword [esp + esi*4 + 0x528]
shr edx, 8
inc dword [esp + edx*4 + 0x928]
movzx edx, word [esp + eax*4 + 0xac]
movzx esi, dl
inc dword [esp + esi*4 + 0x528]
shr edx, 8
inc dword [esp + edx*4 + 0x928]
add eax, 2
cmp ecx, eax
jne 0x407f30
test bl, 1
je 0x407f90
movzx eax, word [esp + eax*4 + 0xa8]
movzx ecx, al
inc dword [esp + ecx*4 + 0x528]
shr eax, 8
inc dword [esp + eax*4 + 0x928]
mov eax, dword [esp + 0x928]
jmp 0x407fb9
lea eax, [esp + 0x528]
push 0x800
push 0
push eax
call fcn.00408810
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0xc], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x18], eax
lea ebp, [esp + 0x1128]
xor ecx, ecx
lea eax, [esp + 0xa8]
lea esi, [esp + 0x528]
xor edx, edx
mov dword [esp], ebx
jmp 0x40800a
mov edx, dword [esp + 4]
inc edx
add ecx, 8
add esi, 0x400
mov eax, edi
cmp edx, dword [esp + 0x18]
je 0x4080b6
mov dword [esp + 4], edx
mov edi, ebp
mov ebp, eax
mov edx, 3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xd1c], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xd20], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xd24], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xd28], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x408020
cmp byte [esp + 0xc], 0
mov dword [esp + 8], edi
jne 0x407ff0
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xd28]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xd28], ebx
mov eax, dword [ebp + edx*4]
mov ebx, ebp
mov ebp, dword [esp + 8]
mov dword [ebp + edi*4], eax
mov ebp, ebx
mov ebx, dword [esp]
mov edi, dword [esp + 8]
mov eax, edx
and eax, 1
xor edx, 1
lea edx, [edx + eax*2]
cmp edx, ebx
jb 0x408070
jmp 0x407ff0
test ebx, ebx
je 0x408465
mov ecx, dword [esp]
cmp ecx, 1
jne 0x4080d0
mov word [edi], 1
jmp 0x40833c
movzx eax, word [edi + 4]
add word [edi], ax
cmp ecx, 3
jl 0x4081c5
mov eax, 2
mov ebx, 2
sub ebx, ecx
xor edx, edx
mov esi, 1
jmp 0x408113
inc eax
add word [edi + esi*4], bp
lea ecx, [ebx + esi]
inc ecx
inc esi
cmp ecx, 1
je 0x4081d4
movzx ecx, word [edi + edx*4]
cmp eax, dword [esp]
jge 0x408125
movzx ebp, word [edi + eax*4]
cmp cx, bp
jae 0x408150
mov word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
cmp eax, dword [esp]
jge 0x40815a
movzx ebp, word [edi + eax*4]
cmp edx, esi
jge 0x408100
movzx ecx, word [edi + edx*4]
cmp cx, bp
jae 0x408100
jmp 0x40815e
inc eax
mov word [edi + esi*4], bp
cmp eax, dword [esp]
jl 0x408133
movzx ecx, word [edi + edx*4]
add word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
jmp 0x408105
mov ecx, ebx
and ecx, 0xfffffffe
lea edx, [eax + ebp]
add edx, 0x8194
xor eax, eax
xor ebp, ebp
jmp 0x40818b
add eax, 2
cmp ecx, eax
je 0x407ec5
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x4081a6
mov word [esp + ebp*4 + 0xa8], si
mov word [esp + ebp*4 + 0xaa], ax
inc ebp
movzx esi, word [edx + eax*2]
test si, si
je 0x408180
mov word [esp + ebp*4 + 0xa8], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0xaa], si
inc ebp
jmp 0x408180
lea ebx, [ecx - 2]
mov word [edi + ecx*4 - 8], 0
jmp 0x408254
mov eax, dword [esp]
mov word [edi + eax*4 - 8], 0
lea edx, [eax - 3]
add eax, 2
mov ecx, edx
and eax, 3
je 0x408201
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 0x4081f0
mov eax, dword [esp]
lea ebx, [eax - 2]
cmp edx, 3
jb 0x408251
inc ecx
nop
nop
nop
movzx eax, word [edi + ecx*4 - 4]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + ecx*4 - 4], ax
movzx eax, word [edi + ecx*4 - 8]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + ecx*4 - 8], ax
movzx eax, word [edi + ecx*4 - 0xc]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + ecx*4 - 0xc], ax
movzx eax, word [edi + ecx*4 - 0x10]
movzx eax, word [edi + eax*4]
inc eax
mov word [edi + ecx*4 - 0x10], ax
add ecx, 0xfffffffc
jne 0x408210
mov ecx, dword [esp]
dec ecx
xor edx, edx
mov esi, 1
jmp 0x40826c
lea esi, [eax + eax]
inc edx
test eax, eax
jle 0x408332
test ebx, ebx
js 0x4082a0
mov dword [esp + 4], edx
lea eax, [ebx + 1]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
mov edx, eax
movzx eax, word [edi + ebx*4]
cmp dword [esp + 4], eax
jne 0x4082b0
inc ebp
dec ebx
mov eax, edx
cmp edx, ebp
jne 0x408280
mov ebx, 0xffffffff
jmp 0x4082b2
xor eax, eax
jmp 0x4082b6
mov eax, ebp
mov edx, dword [esp + 4]
mov ebp, esi
sub ebp, eax
jle 0x408260
mov dword [esp + 4], ebx
mov ebx, ebp
mov ebp, eax
not ebp
add ebp, esi
and ebx, 3
je 0x4082f7
mov dword [esp + 0x18], ebp
mov dword [esp + 0xc], eax
lea eax, [edi + ecx*4]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
mov word [eax], dx
inc ebp
add eax, 0xfffffffc
cmp ebx, ebp
jne 0x4082e0
sub esi, ebp
sub ecx, ebp
mov eax, dword [esp + 0xc]
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 4]
cmp ebp, 3
jb 0x408260
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi + ecx*4], dx
mov word [edi + ecx*4 - 4], dx
mov word [edi + ecx*4 - 8], dx
mov word [edi + ecx*4 - 0xc], dx
add ecx, 0xfffffffc
add esi, 0xfffffffc
cmp esi, eax
jg 0x408310
jmp 0x408260
cmp dword [esp], 0
jle 0x408465
mov eax, dword [esp]
lea edx, [eax - 1]
and eax, 3
xor ecx, ecx
cmp edx, 3
jb 0x40838a
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x24]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x24]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x24]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x24]
add ecx, 4
cmp edx, ecx
jne 0x408360
test eax, eax
je 0x4083ad
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 + 0x24]
inc edx
cmp eax, edx
jne 0x4083a0
cmp dword [esp], 2
jl 0x408465
mov edx, dword [esp + 0x15c0]
lea eax, [edx + 1]
cmp eax, 0x21
jge 0x408430
mov ecx, dword [esp + edx*4 + 0x24]
neg edx
mov esi, dword [esp + 0x15c0]
and edx, 3
je 0x4083ec
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x24]
mov dword [esp + esi*4 + 0x24], ecx
inc eax
dec edx
jne 0x4083e0
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408428
add eax, 3
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x18]
mov dword [esp + edx*4 + 0x24], ecx
add ecx, dword [esp + eax*4 + 0x1c]
mov dword [esp + edx*4 + 0x24], ecx
add ecx, dword [esp + eax*4 + 0x20]
mov dword [esp + edx*4 + 0x24], ecx
add ecx, dword [esp + eax*4 + 0x24]
mov dword [esp + edx*4 + 0x24], ecx
add eax, 4
cmp eax, 0x24
jne 0x408400
test edx, edx
jle 0x4086ed
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x20]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x408440
mov edx, 1
mov ecx, dword [esp + 0x15c0]
shl edx, cl
cmp eax, edx
jne 0x4086f8
mov ebx, dword [esp + 0x10]
shl ebx, 5
mov edi, dword [esp + 0x20]
lea eax, [edi + ebx]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408810
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov ebp, edi
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408810
add esp, 0xc
cmp dword [esp + 0x15c0], 0
jle 0x408595
add dword [esp + 8], 0xfffffffe
mov eax, 1
mov dword [esp + 0x10], ebx
jmp 0x4084e8
mov ebx, dword [esp]
mov dword [esp], ebx
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15c0]
mov eax, ecx
je 0x408595
mov edi, dword [esp + eax*4 + 0x24]
test edi, edi
jle 0x4084d0
mov edx, edi
and edx, 3
je 0x408540
mov dword [esp + 4], edi
mov ecx, ebp
mov esi, dword [esp]
mov edi, dword [esp + 8]
lea ebp, [edi + esi*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebp]
mov ebx, dword [esp + 0x10]
add ebx, ecx
mov byte [edi + ebx + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x408510
mov edi, dword [esp + 4]
mov edx, edi
sub edx, esi
sub dword [esp], esi
mov ebp, ecx
jmp 0x408542
mov edx, edi
cmp edi, 4
mov ebx, dword [esp]
mov edi, dword [esp + 8]
jb 0x4084d3
dec edx
nop
movzx ecx, word [edi + ebx*4]
mov esi, dword [esp + 0x10]
add esi, ebp
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408550
jmp 0x4084d3
mov ebx, dword [esp + 0x15bc]
mov dword [esp + 0x52c], 0
mov eax, dword [esp + 0x15c0]
cmp eax, 2
jl 0x40861d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x4085c9
xor eax, eax
mov edx, 2
test cl, 1
jne 0x408610
jmp 0x40861d
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0x530], eax
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x534], eax
add edx, 2
cmp ebx, edx
jne 0x4085e0
add edx, 2
mov ebx, dword [esp + 0x15bc]
test cl, 1
je 0x40861d
add eax, dword [esp + edx*4 + 0x20]
add eax, eax
mov dword [esp + edx*4 + 0x528], eax
test ebx, ebx
jle 0x4086e2
xor eax, eax
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, ebp
shl ecx, 6
add ecx, ebp
mov dword [esp + 8], ecx
jmp 0x40865c
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], bx
mov ebx, dword [esp + 0x15bc]
inc eax
cmp eax, ebx
je 0x4086e2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408653
mov ebp, dword [esp + ecx*4 + 0x528]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x528], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x4086bf
and ecx, 0xfffffffc
xor ebx, ebx
nop
nop
nop
nop
nop
nop
mov esi, ebp
and esi, 1
shl esi, 2
lea esi, [esi + ebx*8]
mov ebx, ebp
and ebx, 2
or ebx, esi
mov esi, ebp
shr esi, 2
and esi, 1
or esi, ebx
mov ebx, ebp
shr ebx, 3
and ebx, 1
lea ebx, [ebx + esi*2]
shr ebp, 4
add ecx, 0xfffffffc
jne 0x408690
test edi, edi
je 0x408640
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, ebp
and ecx, 1
lea ebx, [ecx + ebx*2]
shr ebp, 1
dec edi
jne 0x4086d0
jmp 0x408640
add esp, 0x15a8
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
mov ecx, dword [esp + 0x15c0]
dec ecx
jmp 0x408723
dec ebp
mov dword [esp + esi*4 + 0x24], ebp
add dword [esp + esi*4 + 0x28], 2
dec eax
cmp eax, edx
je 0x408465
mov esi, dword [esp + 0x15c0]
dec dword [esp + esi*4 + 0x24]
test ecx, ecx
jle 0x40871a
mov esi, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, dword [esp + esi*4 + 0x24]
test ebp, ebp
jne 0x408710
mov edi, esi
not edi
lea esi, [edi + esi*2]
test esi, esi
jg 0x408740
jmp 0x40871a