Function at 0x4084f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.00408ee0
mov edi, edx
mov ebx, ecx
mov esi, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.00408f90
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x18], edi
je 0x4085bc
test esi, esi
mov ecx, esi
mov edi, ebx
jle 0x408d45
xor eax, eax
cmp ecx, 1
je 0x408588
mov ecx, dword [esp + 0x15c8]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x30]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x30]
add eax, 2
cmp ecx, eax
jne 0x408570
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x408d45
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c8]
inc dword [esp + eax*4 + 0x30]
jmp 0x408d45
lea eax, [edi + edi*8]
mov dword [esp + 0x28], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], eax
jle 0x408674
mov ebp, ebx
cmp esi, 1
jne 0x408ba7
xor eax, eax
xor ebx, ebx
mov edi, ebp
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x408619
mov ecx, dword [esp + 0x1c]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408619
mov word [esp + ebx*4 + 0x4b4], cx
mov word [esp + ebx*4 + 0x4b6], ax
inc ebx
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408f90
add esp, 0xc
test ebx, ebx
sete byte [esp + 0xb]
je 0x40868b
xor eax, eax
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4b4]
movzx edx, cl
inc dword [esp + edx*4 + 0x934]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd34]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, ebx
jb 0x408640
mov eax, dword [esp + 0xd34]
jmp 0x408694
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408f90
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0xb], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov edi, 2
sub edi, ecx
lea eax, [ebx - 1]
mov dword [esp + 0x20], eax
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x10], eax
lea eax, [esp + 0x4b4]
mov dword [esp], eax
lea eax, [esp + 0x1134]
xor ecx, ecx
lea esi, [esp + 0x934]
xor edx, edx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x24], edi
jmp 0x408702
mov edx, dword [esp + 0x2c]
inc edx
mov eax, ecx
and eax, 8
xor ecx, 8
lea ecx, [ecx + eax*2]
add esi, 0x400
mov eax, dword [esp + 4]
cmp edx, edi
je 0x408814
mov dword [esp + 0x2c], edx
mov edx, dword [esp]
mov dword [esp + 4], edx
mov dword [esp], eax
mov edx, 3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xa8], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xac], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xb0], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xb4], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x408720
cmp byte [esp + 0xb], 0
jne 0x4086e0
cmp dword [esp + 0x20], 0
je 0x4087cb
xor edx, edx
mov ebp, dword [esp]
mov ebx, dword [esp + 4]
nop
nop
nop
movzx eax, word [ebx + edx*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb4], ebx
mov eax, dword [esp + 4]
mov eax, dword [eax + edx*4]
mov dword [ebp + edi*4], eax
mov eax, dword [esp + 4]
movzx eax, word [eax + edx*4 + 4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb4], ebx
mov ebx, dword [esp + 4]
mov eax, dword [ebx + edx*4 + 4]
mov dword [ebp + edi*4], eax
add edx, 2
cmp dword [esp + 0x10], edx
jne 0x408770
jmp 0x4087cd
xor edx, edx
mov ebx, dword [esp + 0xc]
test bl, 1
mov edi, dword [esp + 0x24]
je 0x4086e0
mov ebp, dword [esp + 4]
movzx eax, word [ebp + edx*4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xb4], ebx
mov ebx, dword [esp + 0xc]
mov eax, dword [ebp + edx*4]
mov edx, dword [esp]
mov dword [edx + edi*4], eax
mov edi, dword [esp + 0x24]
jmp 0x4086e0
test ebx, ebx
je 0x408c15
cmp ebx, 1
jne 0x40882e
mov eax, dword [esp]
mov word [eax], 1
jmp 0x408a7a
mov ecx, dword [esp]
movzx eax, word [ecx + 4]
add word [ecx], ax
cmp ebx, 3
jl 0x4088de
mov eax, 2
mov ecx, 2
sub ecx, ebx
mov dword [esp + 4], ecx
xor esi, esi
mov ebp, 1
jmp 0x40887e
mov ecx, dword [esp]
movzx edi, word [ecx + esi*4]
add word [ecx + ebp*4], di
mov word [ecx + esi*4], bp
inc esi
mov ecx, dword [esp + 4]
lea edx, [ecx + ebp]
inc edx
inc ebp
cmp edx, 1
je 0x4088de
mov ecx, dword [esp]
movzx edx, word [ecx + esi*4]
cmp eax, ebx
jge 0x408892
movzx edi, word [ecx + eax*4]
cmp dx, di
jae 0x4088b0
mov word [ecx + ebp*4], dx
mov word [ecx + esi*4], bp
inc esi
cmp eax, ebx
jge 0x408860
jmp 0x4088b9
inc eax
mov word [ecx + ebp*4], di
cmp eax, ebx
jge 0x408860
cmp esi, ebp
jge 0x4088d0
mov ecx, dword [esp]
movzx edi, word [ecx + esi*4]
movzx edx, word [ecx + eax*4]
cmp di, dx
jb 0x408867
jmp 0x4088d7
mov ecx, dword [esp]
movzx edx, word [ecx + eax*4]
inc eax
add word [ecx + ebp*4], dx
jmp 0x408870
lea ecx, [ebx - 2]
mov ebp, dword [esp]
mov word [ebp + ebx*4 - 8], 0
mov edx, ebx
add edx, 0xfffffffd
js 0x408965
mov esi, ecx
mov eax, edx
and esi, 3
je 0x408914
mov eax, edx
nop
nop
nop
movzx edi, word [ebp + eax*4]
movzx edi, word [ebp + edi*4]
inc edi
mov word [ebp + eax*4], di
dec eax
dec esi
jne 0x408900
cmp edx, 3
jb 0x408965
inc eax
nop
nop
nop
nop
nop
nop
movzx edx, word [ebp + eax*4 - 4]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 4], dx
movzx edx, word [ebp + eax*4 - 8]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 8], dx
movzx edx, word [ebp + eax*4 - 0xc]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 0xc], dx
movzx edx, word [ebp + eax*4 - 0x10]
movzx edx, word [ebp + edx*4]
inc edx
mov word [ebp + eax*4 - 0x10], dx
add eax, 0xfffffffc
jne 0x408920
mov eax, ebx
or eax, 0xfffffffe
mov edx, dword [esp + 0x10]
add eax, edx
inc eax
mov esi, 1
xor edx, edx
jmp 0x4089a8
mov ebp, edi
mov esi, ebp
and esi, 2
mov edi, ebp
or ebp, 2
imul ebp, esi
xor esi, 2
test byte [edx], 0x81
out 0xfd, eax
invalid
invalid
jg 0x4089a8
scasd eax, dword es:[edi]
inc byte [ecx]
std
inc edx
mov esi, ebp
test ebp, ebp
jle 0x408a72
test ecx, ecx
js 0x4089e0
lea edi, [ecx + 1]
mov dword [esp + 4], edi
xor ebx, ebx
mov ebp, dword [esp]
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebp + ecx*4]
cmp edx, edi
jne 0x4089f0
inc ebx
add ecx, 0xffffffff
jb 0x4089c0
mov ecx, 0xffffffff
mov ebx, dword [esp + 0xc]
mov edi, dword [esp + 4]
jmp 0x4089f6
xor edi, edi
jmp 0x4089f6
mov edi, ebx
mov ebx, dword [esp + 0xc]
mov ebp, esi
sub ebp, edi
jle 0x408980
mov dword [esp + 4], edi
not edi
add edi, esi
and ebp, 3
je 0x408a37
mov dword [esp + 0x10], edi
mov edi, dword [esp]
lea edi, [edi + eax*4]
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], dx
inc ebx
add edi, 0xfffffffc
cmp ebp, ebx
jne 0x408a20
sub eax, ebx
sub esi, ebx
mov ebx, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
cmp edi, 3
mov edi, dword [esp]
mov ebp, dword [esp + 4]
jb 0x408982
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi + eax*4], dx
mov word [edi + eax*4 - 4], dx
mov word [edi + eax*4 - 8], dx
mov word [edi + eax*4 - 0xc], dx
add eax, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ebp
jg 0x408a50
jmp 0x408982
test ebx, ebx
jle 0x408c15
mov eax, ebx
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x20], 3
mov edi, dword [esp]
jb 0x408aca
mov edx, ebx
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x30]
add ecx, 4
cmp edx, ecx
jne 0x408aa0
test eax, eax
je 0x408aed
mov edx, dword [esp]
lea ecx, [edx + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x30]
inc edx
cmp eax, edx
jne 0x408ae0
cmp ebx, 2
jl 0x408c15
mov edx, dword [esp + 0x15cc]
cmp edx, 0x20
jge 0x408b70
mov eax, dword [esp + edx*4 + 0x30]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x408b2c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
inc ecx
mov dword [esp + esi*4 + 0x30], eax
dec edx
jne 0x408b20
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408b68
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x3c]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x40]
add ecx, 4
mov dword [esp + edx*4 + 0x30], eax
cmp ecx, 0x20
jne 0x408b40
test edx, edx
jle 0x408c05
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 + 0x2c]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x408b80
mov edx, 1
mov ecx, dword [esp + 0x15cc]
shl edx, cl
cmp eax, edx
jne 0x408e91
jmp 0x408c15
mov ecx, esi
and ecx, 0xfffffffe
mov edi, ebp
lea edx, [eax + ebp]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x408bcb
add eax, 2
cmp ecx, eax
je 0x4085e7
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408be6
mov word [esp + ebx*4 + 0x4b4], si
mov word [esp + ebx*4 + 0x4b6], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x408bc0
mov word [esp + ebx*4 + 0x4b4], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4b6], si
inc ebx
jmp 0x408bc0
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x408e91
mov edi, dword [esp + 0x28]
shl edi, 5
mov esi, dword [esp + 0x14]
lea eax, [esi + edi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408f90
add esp, 0xc
mov eax, dword [esp + 0x1c]
add eax, esi
add eax, 0x8852
mov esi, edi
push 0x240
push 0
push eax
call fcn.00408f90
add esp, 0xc
cmp dword [esp + 0x15cc], 0
jle 0x408d3a
add dword [esp], 0xfffffffe
mov eax, 1
jmp 0x408c82
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15cc]
mov eax, ecx
je 0x408d3a
mov edi, dword [esp + eax*4 + 0x30]
test edi, edi
jle 0x408c70
mov edx, edi
and edx, 3
je 0x408ce0
mov dword [esp + 4], edi
mov dword [esp + 0xc], ebx
mov ecx, dword [esp]
lea ebx, [ecx + ebx*4]
mov ecx, esi
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebx]
mov ebp, dword [esp + 0x14]
add ebp, ecx
mov byte [edi + ebp + 0x8f12], al
inc esi
add ebx, 0xfffffffc
cmp edx, esi
jne 0x408cb0
mov ebx, dword [esp + 0xc]
sub ebx, esi
mov edi, dword [esp + 4]
mov edx, edi
sub edx, esi
mov esi, ecx
jmp 0x408ce2
mov edx, edi
cmp edi, 4
mov ebp, dword [esp]
jb 0x408c70
dec edx
nop
nop
nop
nop
nop
movzx ecx, word [ebp + ebx*4]
mov edi, esi
mov esi, dword [esp + 0x14]
add esi, edi
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + ebx*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
mov esi, edi
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408cf0
jmp 0x408c70
mov ecx, dword [esp + 0x15c8]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x938], 0
mov eax, dword [esp + 0x15cc]
cmp eax, 2
jl 0x408dbd
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408d6d
xor eax, eax
mov edx, 2
jmp 0x408da4
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x93c], eax
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
add edx, 2
cmp ebx, edx
jne 0x408d80
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c8]
je 0x408dbd
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x934], eax
test ecx, ecx
jle 0x408e86
xor eax, eax
mov edx, dword [esp + 0x18]
lea edx, [edx + edx*8]
mov esi, edx
shl esi, 5
add esi, edi
mov dword [esp + 0x10], esi
shl edx, 6
add edx, edi
mov dword [esp + 0x14], edx
jmp 0x408e08
mov ecx, dword [esp + 0x14]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c8]
inc eax
cmp eax, ecx
je 0x408e86
mov edx, dword [esp + 0x10]
movzx edx, byte [eax + edx + 0x8f12]
test edx, edx
je 0x408e03
mov ebx, dword [esp + edx*4 + 0x934]
lea ecx, [ebx + 1]
mov dword [esp + edx*4 + 0x934], ecx
xor edi, edi
cmp dl, 1
mov dword [esp + 4], edx
je 0x408e70
mov ebp, edx
and ebp, 0xfffffffe
lea ecx, [edx + edx]
add ecx, 0xfffffffe
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, ebx
shr edi, 1
mov esi, ebx
and esi, 1
add esi, esi
lea edx, [esi + edx*4]
and edi, 1
or edi, edx
shr ebx, 2
add ecx, 0xfffffffc
mov edx, edi
add ebp, 0xfffffffe
jne 0x408e50
test byte [esp + 4], 1
je 0x408df0
and ebx, 1
lea edi, [ebx + edi*2]
jmp 0x408df0
add esp, 0x15b4
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [esp + 0x15cc]
mov ecx, dword [esp + edi*4 + 0x30]
mov esi, ecx
not esi
lea ecx, [esi + ecx*2]
mov dword [esp + edi*4 + 0x30], ecx
mov ecx, edi
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408ec8
mov esi, dword [esp + ecx*4 + 0x2c]
dec ecx
test esi, esi
je 0x408eb0
dec esi
mov dword [esp + ecx*4 + 0x30], esi
add dword [esp + ecx*4 + 0x34], 2
dec eax
cmp eax, edx
jne 0x408e91
jmp 0x408c15