Function at 0x4083a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.00408d50
mov esi, edx
mov ebp, ecx
mov ebx, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.00408f10
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
je 0x40844e
test ebx, ebx
jle 0x408b6d
xor eax, eax
cmp ebx, 1
je 0x408428
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0xc]
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
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 0x408410
test bl, 1
mov esi, dword [esp + 0xc]
je 0x408b6d
lea ecx, [esi + esi*8]
shl ecx, 5
add ecx, ebp
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x2c]
jmp 0x408b6d
lea esi, [esi + esi*8]
mov edi, esi
shl esi, 6
test ebx, ebx
mov dword [esp + 0x20], esi
jle 0x40853b
lea eax, [esi + ebp]
add eax, 0x8192
xor ecx, ecx
xor ebp, ebp
jmp 0x40847f
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
cmp ecx, ebx
jge 0x40849b
movzx edx, word [eax + ecx*2]
test dx, dx
je 0x408470
mov word [esp + ebp*4 + 0xcb0], dx
mov word [esp + ebp*4 + 0xcb2], cx
inc ebp
jmp 0x408470
lea eax, [esp + 0x4b0]
push 0x800
push 0
push eax
call fcn.00408f10
add esp, 0xc
test ebp, ebp
sete byte [esp + 0x10]
je 0x408552
mov ecx, ebp
xor eax, eax
cmp ebp, 1
je 0x40850f
mov ecx, ebp
and ecx, 0xfffffffe
xor eax, eax
nop
movzx edx, word [esp + eax*4 + 0xcb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x4b0]
shr edx, 8
inc dword [esp + edx*4 + 0x8b0]
movzx edx, word [esp + eax*4 + 0xcb4]
movzx esi, dl
inc dword [esp + esi*4 + 0x4b0]
shr edx, 8
inc dword [esp + edx*4 + 0x8b0]
add eax, 2
cmp ecx, eax
jne 0x4084d0
mov edx, ebp
test dl, 1
je 0x408532
movzx eax, word [esp + eax*4 + 0xcb0]
movzx ecx, al
inc dword [esp + ecx*4 + 0x4b0]
shr eax, 8
inc dword [esp + eax*4 + 0x8b0]
mov eax, dword [esp + 0x8b0]
jmp 0x40855b
lea eax, [esp + 0x4b0]
push 0x800
push 0
push eax
call fcn.00408f10
add esp, 0xc
xor edx, edx
mov byte [esp + 0x10], 1
xor eax, eax
xor ecx, ecx
cmp eax, edx
sete cl
mov esi, 2
sub esi, ecx
lea eax, [edx - 1]
mov dword [esp + 0x18], eax
mov dword [esp], edx
and edx, 0xfffffffe
lea eax, [esp + 0xcb0]
mov dword [esp + 4], eax
xor ebx, ebx
lea eax, [esp + 0x1130]
xor ecx, ecx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x14], edx
jmp 0x4085bc
mov ebx, dword [esp + 0x1c]
mov eax, ebx
and eax, 1
xor ebx, 1
lea ebx, [ebx + eax*2]
add ecx, 8
mov eax, ebp
cmp ebx, esi
jae 0x4086bc
mov ebp, dword [esp + 4]
mov dword [esp + 4], eax
mov dword [esp + 0x1c], ebx
mov eax, ebx
shl eax, 0xa
add eax, esp
add eax, 0x4b0
mov edx, 3
xor ebx, ebx
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xa4], ebx
add ebx, dword [eax + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xa8], ebx
add ebx, dword [eax + edx*4 - 8]
mov dword [esp + edx*4 + 0xac], ebx
add ebx, dword [eax + edx*4 - 4]
mov dword [esp + edx*4 + 0xb0], ebx
add ebx, dword [eax + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x4085e0
cmp byte [esp + 0x10], 0
jne 0x4085a0
cmp dword [esp + 0x18], 0
je 0x408681
xor eax, eax
mov esi, dword [esp + 4]
nop
nop
nop
nop
nop
nop
movzx edx, word [ebp + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb0]
lea edi, [ebx + 1]
mov dword [esp + edx*4 + 0xb0], edi
mov edx, dword [ebp + eax*4]
mov dword [esi + ebx*4], edx
movzx edx, word [ebp + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb0]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb0], ebx
mov edx, dword [ebp + eax*4 + 4]
mov dword [esi + edi*4], edx
mov edx, dword [esp + 0x14]
add eax, 2
cmp edx, eax
jne 0x408630
jmp 0x408683
xor eax, eax
test byte [esp], 1
mov esi, dword [esp + 0x28]
je 0x4085a0
movzx edx, word [ebp + eax*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb0]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb0], ebx
mov eax, dword [ebp + eax*4]
mov edx, dword [esp + 4]
mov dword [edx + edi*4], eax
jmp 0x4085a0
cmp dword [esp], 0
mov ebp, dword [esp + 8]
je 0x408a25
mov ecx, dword [esp]
cmp ecx, 1
jne 0x4086e0
mov eax, dword [esp + 4]
mov word [eax], 1
jmp 0x4088fc
mov edx, dword [esp + 4]
movzx eax, word [edx + 4]
add word [edx], ax
cmp ecx, 3
jl 0x40878b
mov eax, 2
mov ecx, 2
sub ecx, dword [esp]
xor edx, edx
mov esi, 1
jmp 0x40872b
movzx ebp, word [edi + edx*4]
add word [edi + esi*4], bp
mov word [edi + edx*4], si
inc edx
mov ebp, dword [esp + 8]
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
je 0x40878b
mov edi, dword [esp + 4]
movzx ebx, word [edi + edx*4]
cmp eax, dword [esp]
jge 0x408741
movzx ebp, word [edi + eax*4]
cmp bx, bp
jae 0x408760
mov word [edi + esi*4], bx
mov word [edi + edx*4], si
inc edx
cmp eax, dword [esp]
jge 0x408710
jmp 0x40876a
inc eax
mov word [edi + esi*4], bp
cmp eax, dword [esp]
jge 0x408710
cmp edx, esi
jge 0x408780
movzx ebp, word [edi + edx*4]
movzx ebx, word [edi + eax*4]
cmp bp, bx
jb 0x408714
jmp 0x408784
movzx ebx, word [edi + eax*4]
inc eax
add word [edi + esi*4], bx
jmp 0x40871d
mov edx, dword [esp]
mov edi, dword [esp + 4]
mov word [edi + edx*4 - 8], 0
mov ecx, edx
add ecx, 0xfffffffd
js 0x408811
add edx, 2
mov eax, ecx
and edx, 3
je 0x4087c1
mov eax, ecx
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 0x4087b0
cmp ecx, 3
mov edx, dword [esp]
jb 0x408811
inc eax
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 0x4087d0
lea ecx, [edx - 2]
mov esi, 1
xor edx, edx
mov eax, dword [esp + 0x18]
jmp 0x40883c
lea esi, [ebx + ebx]
inc edx
test ebx, ebx
jle 0x4088f2
test ecx, ecx
js 0x408870
lea ebp, [ecx + 1]
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + 4]
movzx edi, word [edi + ecx*4]
cmp edx, edi
jne 0x408869
inc ebx
dec ecx
cmp ebp, ebx
jne 0x408850
mov ecx, 0xffffffff
mov ebx, ebp
mov ebp, dword [esp + 8]
jmp 0x408872
xor ebx, ebx
mov edi, esi
sub edi, ebx
jle 0x408830
mov ebp, edi
mov edi, ebx
not edi
add edi, esi
and ebp, 3
mov dword [esp + 0x14], ebp
je 0x4088be
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], ebx
mov edi, dword [esp + 4]
lea ebp, [edi + eax*4]
xor ebx, ebx
mov edi, dword [esp + 0x14]
nop
nop
mov word [ebp], dx
inc ebx
add ebp, 0xfffffffc
cmp edi, ebx
jne 0x4088a0
sub esi, ebx
sub eax, ebx
mov ebp, dword [esp + 8]
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
jmp 0x4088c2
mov ebp, dword [esp + 8]
cmp edi, 3
mov edi, dword [esp + 4]
jb 0x408830
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, ebx
jg 0x4088d0
jmp 0x408830
cmp dword [esp], 0
jle 0x408a25
mov eax, dword [esp]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x18], 3
mov edi, dword [esp + 4]
jb 0x40894a
mov edx, dword [esp]
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 + 0x2c]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x2c]
add ecx, 4
cmp edx, ecx
jne 0x408920
test eax, eax
je 0x40896d
mov edx, dword [esp + 4]
lea ecx, [edx + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x2c]
inc edx
cmp eax, edx
jne 0x408960
cmp dword [esp], 2
jl 0x408a25
mov edx, dword [esp + 0x15c8]
cmp edx, 0x20
jge 0x4089f0
mov eax, dword [esp + edx*4 + 0x2c]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x4089ac
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
inc ecx
mov dword [esp + esi*4 + 0x2c], eax
dec edx
jne 0x4089a0
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x4089e8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + edx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + edx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + edx*4 + 0x2c], eax
add eax, dword [esp + ecx*4 + 0x3c]
add ecx, 4
mov dword [esp + edx*4 + 0x2c], eax
cmp ecx, 0x20
jne 0x4089c0
test edx, edx
jle 0x408ced
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 + 0x28]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x408a00
mov edx, 1
mov ecx, dword [esp + 0x15c8]
shl edx, cl
cmp eax, edx
jne 0x408cf8
mov esi, dword [esp + 0x24]
shl esi, 5
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408f10
add esp, 0xc
mov eax, dword [esp + 0x20]
add eax, ebp
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408f10
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov ebx, dword [esp + 0x15c4]
jle 0x408b69
add dword [esp + 4], 0xfffffffe
mov eax, 1
jmp 0x408aa3
mov edi, dword [esp]
mov dword [esp], edi
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15c8]
mov eax, ecx
mov ebp, dword [esp + 8]
mov ebx, dword [esp + 0x15c4]
je 0x408b69
mov edi, dword [esp + eax*4 + 0x2c]
test edi, edi
jle 0x408a80
mov edx, edi
and edx, 3
je 0x408b00
mov dword [esp + 0x14], edi
mov ecx, dword [esp]
mov edi, esi
mov esi, dword [esp + 4]
lea ebx, [esi + ecx*4]
xor esi, esi
mov ecx, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebx]
mov ebp, dword [esp + 8]
add ebp, ecx
mov byte [edi + ebp + 0x8f12], al
inc esi
add ebx, 0xfffffffc
cmp edx, esi
jne 0x408ad0
mov edi, dword [esp + 0x14]
mov edx, edi
sub edx, esi
sub dword [esp], esi
mov esi, ecx
jmp 0x408b02
mov edx, edi
cmp edi, 4
mov edi, dword [esp]
mov ebx, dword [esp + 4]
jb 0x408a83
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebx + edi*4]
mov ebp, esi
mov esi, dword [esp + 8]
add esi, ebp
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebx + edi*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebx + edi*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebx + edi*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
mov esi, ebp
add edi, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408b20
jmp 0x408a83
mov esi, dword [esp + 0xc]
mov dword [esp + 0x4b4], 0
mov eax, dword [esp + 0x15c8]
cmp eax, 2
jl 0x408c14
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408b9e
xor edx, edx
mov eax, 2
test cl, 1
jne 0x408bfa
jmp 0x408c14
mov ebx, ecx
and ebx, 0xfffffffe
xor edx, edx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + eax*4 + 0x30]
mov edi, dword [esp + eax*4 + 0x34]
mov ebp, esi
and ebp, edx
xor esi, edx
lea edx, [esi + ebp*2]
add edx, edx
mov dword [esp + eax*4 + 0x4b8], edx
mov esi, edi
and esi, edx
xor edx, edi
lea edx, [edx + esi*2]
add edx, edx
mov dword [esp + eax*4 + 0x4bc], edx
add eax, 2
cmp ebx, eax
jne 0x408bb0
add eax, 2
mov ebx, dword [esp + 0x15c4]
mov ebp, dword [esp + 8]
mov esi, dword [esp + 0xc]
test cl, 1
je 0x408c14
mov ecx, dword [esp + eax*4 + 0x28]
mov esi, ecx
and esi, edx
xor ecx, edx
lea ecx, [ecx + esi*2]
mov esi, dword [esp + 0xc]
add ecx, ecx
mov dword [esp + eax*4 + 0x4b0], ecx
test ebx, ebx
jle 0x408ce2
xor eax, eax
lea ecx, [esi + esi*8]
mov edx, ecx
shl edx, 5
add edx, ebp
shl ecx, 6
add ecx, ebp
mov dword [esp + 8], ecx
jmp 0x408c5c
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], bx
mov ebx, dword [esp + 0x15c4]
inc eax
cmp eax, ebx
je 0x408ce2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408c53
mov ebp, dword [esp + ecx*4 + 0x4b0]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x4b0], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x408cbf
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 0x408c90
test edi, edi
je 0x408c40
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 0x408cd0
jmp 0x408c40
add esp, 0x15b0
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 + 0x15c8]
dec ecx
jmp 0x408d19
dec eax
cmp eax, edx
je 0x408a25
mov esi, dword [esp + 0x15c8]
dec dword [esp + esi*4 + 0x2c]
mov esi, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
test esi, esi
jle 0x408d10
mov ebx, dword [esp + esi*4 + 0x2c]
dec esi
test ebx, ebx
je 0x408d30
dec ebx
mov dword [esp + esi*4 + 0x30], ebx
add dword [esp + esi*4 + 0x34], 2
jmp 0x408d10