Function at 0x4083a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.00408d50
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.00408e00
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x18], ebx
je 0x408455
test esi, esi
jle 0x408ba7
xor eax, eax
cmp esi, 1
je 0x408428
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
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 0x408410
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x408ba7
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x30]
jmp 0x408ba7
lea eax, [ebx + ebx*8]
mov dword [esp + 0x10], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], eax
jle 0x408509
cmp esi, 1
jne 0x40875b
xor ebx, ebx
xor eax, eax
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x4084ae
mov ecx, dword [esp + 0x24]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4084ae
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.00408e00
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x408520
xor eax, eax
movzx ecx, word [esp + eax*4 + 0x4b4]
mov edx, ecx
xor edx, 0x3fffff00
mov esi, ecx
or esi, 0xff
and esi, edx
inc dword [esp + esi*4 + 0x934]
shr ecx, 8
inc dword [esp + ecx*4 + 0xd34]
inc eax
cmp ebx, eax
jne 0x4084d0
mov eax, dword [esp + 0xd34]
jmp 0x408529
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.00408e00
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov ebp, 2
sub ebp, ecx
lea eax, [ebx - 1]
mov dword [esp + 0x1c], eax
mov edx, ebx
and edx, 0xfffffffe
lea eax, [esp + 0x4b4]
mov dword [esp + 8], eax
lea eax, [esp + 0x1134]
xor ecx, ecx
lea esi, [esp + 0x934]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x20], edx
jmp 0x40859d
mov edi, dword [esp + 0x14]
inc edi
add ecx, 8
add esi, 0x400
mov eax, dword [esp]
mov dword [esp + 0x14], edi
cmp edi, ebp
je 0x4086a3
mov edx, dword [esp + 8]
mov dword [esp], edx
mov dword [esp + 8], eax
mov eax, 3
xor edx, edx
nop
mov dword [esp + eax*4 + 0xa8], edx
add edx, dword [esi + eax*4 - 0xc]
mov dword [esp + eax*4 + 0xac], edx
add edx, dword [esi + eax*4 - 8]
mov dword [esp + eax*4 + 0xb0], edx
add edx, dword [esi + eax*4 - 4]
mov dword [esp + eax*4 + 0xb4], edx
add edx, dword [esi + eax*4]
add eax, 4
cmp eax, 0x103
jne 0x4085b0
cmp byte [esp + 7], 0
jne 0x408580
cmp dword [esp + 0x1c], 0
je 0x40865a
xor eax, eax
mov ebp, dword [esp + 8]
mov ebx, dword [esp]
nop
nop
nop
nop
movzx edx, word [ebx + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb4]
lea edi, [ebx + 1]
mov dword [esp + edx*4 + 0xb4], edi
mov edx, dword [esp]
mov edx, dword [edx + eax*4]
mov dword [ebp + ebx*4], edx
mov edx, dword [esp]
movzx edx, word [edx + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb4], ebx
mov ebx, dword [esp]
mov edx, dword [ebx + eax*4 + 4]
mov dword [ebp + edi*4], edx
mov edx, dword [esp + 0x20]
add eax, 2
cmp edx, eax
jne 0x408600
jmp 0x40865c
xor eax, eax
mov ebx, dword [esp + 0xc]
test bl, 1
mov ebp, dword [esp + 0x28]
je 0x408580
mov ebp, dword [esp]
movzx edx, word [ebp + eax*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb4]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb4], ebx
mov ebx, dword [esp + 0xc]
mov eax, dword [ebp + eax*4]
mov ebp, dword [esp + 0x28]
mov edx, dword [esp + 8]
mov dword [edx + edi*4], eax
jmp 0x408580
test ebx, ebx
je 0x408a65
cmp ebx, 1
jne 0x4086be
mov eax, dword [esp + 8]
mov word [eax], 1
jmp 0x40893e
mov edi, dword [esp + 8]
movzx eax, word [edi + 4]
add word [edi], ax
cmp ebx, 3
jl 0x4087b5
mov eax, 2
mov ecx, 2
sub ecx, ebx
mov dword [esp], ecx
xor edx, edx
mov esi, 1
jmp 0x40870d
movzx ecx, word [edi + edx*4]
add word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
mov ecx, dword [esp]
add ecx, esi
inc ecx
inc esi
cmp ecx, 1
je 0x4087c1
movzx ecx, word [edi + edx*4]
cmp eax, ebx
jge 0x40871e
movzx ebp, word [edi + eax*4]
cmp cx, bp
jae 0x408730
mov word [edi + esi*4], cx
mov word [edi + edx*4], si
inc edx
cmp eax, ebx
jge 0x4086f0
jmp 0x408739
inc eax
mov word [edi + esi*4], bp
cmp eax, ebx
jge 0x4086f0
cmp edx, esi
jge 0x408750
movzx ecx, word [edi + edx*4]
movzx ebp, word [edi + eax*4]
cmp cx, bp
jb 0x4086f4
jmp 0x408754
movzx ebp, word [edi + eax*4]
inc eax
add word [edi + esi*4], bp
jmp 0x4086fd
mov ecx, esi
and ecx, 0xfffffffe
lea edx, [eax + edi]
add edx, 0x8194
xor ebx, ebx
xor eax, eax
jmp 0x40877b
add eax, 2
cmp ecx, eax
je 0x40847c
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408796
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 0x408770
mov word [esp + ebx*4 + 0x4b4], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4b6], si
inc ebx
jmp 0x408770
mov word [edi + ebx*4 - 8], 0
jmp 0x408841
mov word [edi + ebx*4 - 8], 0
lea ecx, [ebx - 3]
lea edx, [ebx + 2]
mov eax, ecx
and edx, 3
je 0x4087f1
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + eax*4]
movzx esi, word [edi + esi*4]
inc esi
mov word [edi + eax*4], si
dec eax
dec edx
jne 0x4087e0
cmp ecx, 3
jb 0x408841
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + eax*4 - 4]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 4], cx
movzx ecx, word [edi + eax*4 - 8]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 8], cx
movzx ecx, word [edi + eax*4 - 0xc]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 0xc], cx
movzx ecx, word [edi + eax*4 - 0x10]
movzx ecx, word [edi + ecx*4]
inc ecx
mov word [edi + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x408800
mov eax, ebx
or eax, 0xfffffffd
mov ecx, ebx
and ecx, 0xfffffffd
add ecx, eax
inc ecx
mov esi, 1
mov dword [esp], 0
mov eax, dword [esp + 0x1c]
jmp 0x408872
mov ebx, dword [esp]
lea esi, [edx + edx]
inc ebx
mov dword [esp], ebx
test edx, edx
jle 0x408932
test ecx, ecx
js 0x4088a0
lea edx, [ecx + 1]
xor ebp, ebp
mov ebx, dword [esp]
nop
nop
mov edi, edx
mov edx, dword [esp + 8]
movzx edx, word [edx + ecx*4]
cmp ebx, edx
jne 0x4088b0
inc ebp
dec ecx
mov edx, edi
cmp edi, ebp
jne 0x408880
mov ecx, 0xffffffff
jmp 0x4088b2
xor edx, edx
jmp 0x4088b6
mov edx, ebp
mov edi, dword [esp + 8]
mov ebp, esi
sub ebp, edx
jle 0x408860
mov ebx, edx
not ebx
add ebx, esi
and ebp, 3
je 0x4088fb
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], edx
lea edx, [edi + eax*4]
mov ebx, ebp
xor ebp, ebp
mov edi, dword [esp]
nop
nop
nop
nop
nop
nop
nop
mov word [edx], di
inc ebp
add edx, 0xfffffffc
cmp ebx, ebp
jne 0x4088e0
sub esi, ebp
sub eax, ebp
mov edi, dword [esp + 8]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x14]
cmp ebx, 3
mov ebx, dword [esp]
jb 0x408863
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi + eax*4], bx
mov word [edi + eax*4 - 4], bx
mov word [edi + eax*4 - 8], bx
mov word [edi + eax*4 - 0xc], bx
add eax, 0xfffffffc
add esi, 0xfffffffc
cmp esi, edx
jg 0x408910
jmp 0x408863
mov ebx, dword [esp + 0xc]
test ebx, ebx
jle 0x408a65
mov eax, ebx
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x1c], 3
mov edi, dword [esp + 8]
jb 0x40898a
mov edx, ebx
and edx, 0xfffffffc
xor ecx, ecx
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 0x408960
test eax, eax
je 0x4089ad
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 + 0x30]
inc edx
cmp eax, edx
jne 0x4089a0
cmp ebx, 2
jl 0x408a65
mov edx, dword [esp + 0x15cc]
lea eax, [edx + 1]
cmp eax, 0x21
jge 0x408a30
mov ecx, dword [esp + edx*4 + 0x30]
neg edx
mov esi, dword [esp + 0x15cc]
and edx, 3
je 0x4089ec
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + esi*4 + 0x30], ecx
inc eax
dec edx
jne 0x4089e0
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408a28
add eax, 3
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x24]
mov dword [esp + edx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + edx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x2c]
mov dword [esp + edx*4 + 0x30], ecx
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + edx*4 + 0x30], ecx
add eax, 4
cmp eax, 0x24
jne 0x408a00
test edx, edx
jle 0x408cee
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 0x408a40
mov edx, 1
mov ecx, dword [esp + 0x15cc]
shl edx, cl
cmp eax, edx
jne 0x408cf9
mov ebx, dword [esp + 0x10]
shl ebx, 5
mov edi, dword [esp + 0x2c]
lea eax, [edi + ebx]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408e00
add esp, 0xc
mov eax, dword [esp + 0x24]
mov esi, edi
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408e00
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov edi, dword [esp + 8]
jle 0x408ba5
add edi, 0xfffffffe
mov eax, 1
mov dword [esp + 8], edi
mov dword [esp + 0x10], ebx
jmp 0x408aee
mov ebp, dword [esp + 0xc]
mov ebx, esi
mov esi, ebx
mov dword [esp + 0xc], ebp
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15cc]
mov eax, ecx
je 0x408ba5
mov ebp, dword [esp + eax*4 + 0x30]
test ebp, ebp
jle 0x408ad0
mov edx, ebp
and edx, 3
je 0x408b40
mov dword [esp], ebp
mov ecx, esi
mov esi, dword [esp + 0xc]
lea ebp, [edi + esi*4]
xor esi, esi
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 0x408b10
sub dword [esp + 0xc], esi
mov ebp, dword [esp]
mov edx, ebp
sub edx, esi
mov esi, ecx
jmp 0x408b42
mov edx, ebp
cmp ebp, 4
mov ebp, dword [esp + 0xc]
mov edi, dword [esp + 8]
mov ebx, esi
jb 0x408ad6
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edi + ebp*4]
mov esi, dword [esp + 0x10]
add esi, ebx
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebp*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebp*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebp*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebp, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408b60
jmp 0x408ad6
mov edi, esi
mov dword [esp + 0x938], 0
mov ecx, dword [esp + 0x15cc]
cmp ecx, 2
jl 0x408c15
lea eax, [ecx - 1]
cmp ecx, 2
jne 0x408bd3
mov edx, 2
xor ecx, ecx
test al, 1
jne 0x408c08
jmp 0x408c15
mov ebx, eax
and ebx, 0xfffffffe
xor ecx, ecx
xor edx, edx
nop
nop
nop
nop
add ecx, dword [esp + edx*4 + 0x34]
add ecx, ecx
mov dword [esp + edx*4 + 0x93c], ecx
add ecx, dword [esp + edx*4 + 0x38]
add ecx, ecx
mov dword [esp + edx*4 + 0x940], ecx
add edx, 2
cmp ebx, edx
jne 0x408be0
add edx, 2
test al, 1
je 0x408c15
add ecx, dword [esp + edx*4 + 0x2c]
add ecx, ecx
mov dword [esp + edx*4 + 0x934], ecx
mov ecx, dword [esp + 0x15c8]
test ecx, ecx
jle 0x408ce3
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], esi
shl edx, 6
add edx, edi
mov dword [esp + 0x10], edx
jmp 0x408c68
mov ecx, dword [esp + 0x10]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c8]
inc eax
cmp eax, ecx
je 0x408ce3
mov edx, dword [esp]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x408c63
mov edx, dword [esp + ebx*4 + 0x934]
lea edi, [edx + 1]
mov dword [esp + ebx*4 + 0x934], edi
xor edi, edi
cmp bl, 1
je 0x408ccb
mov ebp, ebx
and ebp, 0xfffffffe
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, edx
not esi
or esi, 1
add esi, edx
mov ecx, edx
shr ecx, 1
shl edi, 2
add esi, esi
add esi, 2
or esi, edi
mov edi, ecx
not edi
or edi, 1
add edi, ecx
inc edi
or edi, esi
shr edx, 2
add ebp, 0xfffffffe
jne 0x408ca0
test bl, 1
je 0x408c50
add edi, edi
mov ecx, edx
not ecx
or ecx, 1
add ecx, edx
inc ecx
or edi, ecx
jmp 0x408c50
add esp, 0x15b4
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 + 0x15cc]
dec ecx
jmp 0x408d19
dec eax
cmp eax, edx
je 0x408a65
mov esi, dword [esp + 0x15cc]
dec dword [esp + esi*4 + 0x30]
mov esi, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
test esi, esi
jle 0x408d10
mov ebp, dword [esp + esi*4 + 0x30]
dec esi
test ebp, ebp
je 0x408d30
dec ebp
mov dword [esp + esi*4 + 0x34], ebp
add dword [esp + esi*4 + 0x38], 2
jmp 0x408d10