Function at 0x408430
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.00408e70
mov edi, edx
mov ebx, ecx
mov esi, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.004090d0
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0x18], edi
je 0x40852b
test esi, esi
mov ecx, esi
jle 0x408c0f
mov ebp, ebx
xor eax, eax
cmp ecx, 1
je 0x4084e6
mov ecx, dword [esp + 0x15c0]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
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
nop
nop
nop
movzx esi, byte [edx + eax - 1]
mov edi, dword [esp + esi*4 + 0x28]
mov ebx, edi
and ebx, 1
xor edi, 1
lea edi, [edi + ebx*2]
mov dword [esp + esi*4 + 0x28], edi
movzx esi, byte [edx + eax]
mov edi, dword [esp + esi*4 + 0x28]
mov ebx, edi
and ebx, 1
xor edi, 1
lea edi, [edi + ebx*2]
mov dword [esp + esi*4 + 0x28], edi
add eax, 2
cmp ecx, eax
jne 0x4084b0
mov ecx, dword [esp + 0x15c0]
test cl, 1
mov ebx, ebp
je 0x408c0f
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, ebx
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + eax*4 + 0x28]
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
mov dword [esp + eax*4 + 0x28], ecx
mov ecx, dword [esp + 0x15c0]
jmp 0x408c0f
lea eax, [edi + edi*8]
mov dword [esp + 0x14], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], eax
jle 0x40862b
cmp esi, 1
jne 0x408d8d
xor eax, eax
xor edi, edi
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x408584
mov ecx, dword [esp + 0x20]
add ecx, ebx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408584
mov word [esp + edi*4 + 0x4ac], cx
mov word [esp + edi*4 + 0x4ae], ax
inc edi
lea eax, [esp + 0x92c]
push 0x800
push 0
push eax
call fcn.004090d0
add esp, 0xc
test edi, edi
sete byte [esp + 0xb]
je 0x408642
mov ecx, edi
xor eax, eax
cmp edi, 1
je 0x4085ff
mov ecx, edi
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0x4ac]
movzx esi, dl
inc dword [esp + esi*4 + 0x92c]
shr edx, 8
inc dword [esp + edx*4 + 0xd2c]
movzx edx, word [esp + eax*4 + 0x4b0]
movzx esi, dl
inc dword [esp + esi*4 + 0x92c]
shr edx, 8
inc dword [esp + edx*4 + 0xd2c]
add eax, 2
cmp ecx, eax
jne 0x4085c0
mov edx, edi
test dl, 1
je 0x408622
movzx eax, word [esp + eax*4 + 0x4ac]
movzx ecx, al
inc dword [esp + ecx*4 + 0x92c]
shr eax, 8
inc dword [esp + eax*4 + 0xd2c]
mov eax, dword [esp + 0xd2c]
jmp 0x40864b
lea eax, [esp + 0x92c]
push 0x800
push 0
push eax
call fcn.004090d0
add esp, 0xc
xor edx, edx
mov byte [esp + 0xb], 1
xor eax, eax
xor ecx, ecx
cmp eax, edx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 4], edx
and edx, 0xfffffffe
mov dword [esp + 0xc], edx
lea edi, [esp + 0x4ac]
lea eax, [esp + 0x112c]
xor ecx, ecx
lea esi, [esp + 0x92c]
xor edx, edx
jmp 0x4086ab
mov edx, dword [esp + 0x1c]
inc edx
add ecx, 8
add esi, 0x400
mov eax, dword [esp]
cmp edx, dword [esp + 0x24]
je 0x4087a7
mov dword [esp + 0x1c], edx
mov dword [esp], edi
mov edi, eax
mov edx, 3
xor eax, eax
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xa0], eax
add eax, dword [esi + edx*4 - 0xc]
mov dword [esp + edx*4 + 0xa4], eax
add eax, dword [esi + edx*4 - 8]
mov dword [esp + edx*4 + 0xa8], eax
add eax, dword [esi + edx*4 - 4]
mov dword [esp + edx*4 + 0xac], eax
add eax, dword [esi + edx*4]
add edx, 4
cmp edx, 0x103
jne 0x4086c0
cmp byte [esp + 0xb], 0
jne 0x408690
xor edx, edx
cmp dword [esp + 4], 1
mov ebx, dword [esp]
je 0x40876c
xor edx, edx
nop
nop
nop
nop
nop
movzx eax, word [ebx + edx*4]
shr eax, cl
movzx eax, al
mov ebp, edi
mov edi, dword [esp + eax*4 + 0xac]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xac], ebx
mov eax, dword [esp]
mov eax, dword [eax + edx*4]
mov dword [ebp + edi*4], eax
mov eax, dword [esp]
movzx eax, word [eax + edx*4 + 4]
shr eax, cl
movzx eax, al
mov edi, dword [esp + eax*4 + 0xac]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xac], ebx
mov ebx, dword [esp]
mov eax, dword [ebx + edx*4 + 4]
mov dword [ebp + edi*4], eax
mov eax, dword [esp + 0xc]
mov edi, ebp
add edx, 2
cmp eax, edx
jne 0x408710
test byte [esp + 4], 1
je 0x408690
mov eax, dword [esp]
movzx eax, word [eax + edx*4]
shr eax, cl
movzx eax, al
mov ebp, edi
mov edi, dword [esp + eax*4 + 0xac]
lea ebx, [edi + 1]
mov dword [esp + eax*4 + 0xac], ebx
mov eax, dword [esp]
mov eax, dword [eax + edx*4]
mov dword [ebp + edi*4], eax
mov edi, ebp
jmp 0x408690
cmp dword [esp + 4], 0
je 0x408ab5
mov ecx, dword [esp + 4]
cmp ecx, 1
jne 0x4087c5
mov word [edi], 1
jmp 0x4089ea
movzx eax, word [edi + 4]
add word [edi], ax
cmp ecx, 3
jl 0x40885b
mov eax, 2
mov ecx, 2
sub ecx, dword [esp + 4]
mov dword [esp], ecx
mov edx, 1
xor esi, esi
jmp 0x408809
movzx ecx, word [edi + esi*4]
add word [edi + edx*4], cx
mov word [edi + esi*4], dx
inc esi
mov ecx, dword [esp]
add ecx, edx
inc ecx
inc edx
cmp ecx, 1
je 0x40885b
movzx ecx, word [edi + esi*4]
cmp eax, dword [esp + 4]
jge 0x40881c
movzx ebp, word [edi + eax*4]
cmp cx, bp
jae 0x408830
mov word [edi + edx*4], cx
mov word [edi + esi*4], dx
inc esi
cmp eax, dword [esp + 4]
jge 0x4087f0
jmp 0x40883b
inc eax
mov word [edi + edx*4], bp
cmp eax, dword [esp + 4]
jge 0x4087f0
cmp esi, edx
jge 0x408850
movzx ecx, word [edi + esi*4]
movzx ebp, word [edi + eax*4]
cmp cx, bp
jb 0x4087f4
jmp 0x408854
movzx ebp, word [edi + eax*4]
inc eax
add word [edi + edx*4], bp
jmp 0x4087fd
mov edx, dword [esp + 4]
mov word [edi + edx*4 - 8], 0
mov ecx, edx
add ecx, 0xfffffffd
js 0x4088e1
add edx, 2
mov eax, ecx
and edx, 3
je 0x408891
mov eax, ecx
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 0x408880
cmp ecx, 3
mov edx, dword [esp + 4]
jb 0x4088e1
inc eax
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 0x4088a0
lea eax, [edx - 1]
lea ecx, [edx - 2]
mov dword [esp + 0xc], ecx
mov ebp, 1
xor ecx, ecx
jmp 0x40890c
lea ebp, [esi + esi]
inc ecx
test esi, esi
jle 0x4089e2
cmp dword [esp + 0xc], 0
js 0x408950
mov dword [esp], ecx
xor esi, esi
mov ebx, dword [esp + 0xc]
nop
nop
nop
nop
movzx ecx, word [edi + ebx*4]
mov edx, dword [esp]
cmp edx, ecx
jne 0x408960
lea ecx, [ebx - 1]
mov edx, esi
xor edx, 1
and esi, 1
lea esi, [edx + esi*2]
test ebx, ebx
mov ebx, ecx
jg 0x408920
mov dword [esp + 0xc], 0xffffffff
mov edx, dword [esp + 4]
mov ecx, dword [esp]
jmp 0x40896a
xor esi, esi
jmp 0x40896a
mov ecx, edx
mov dword [esp + 0xc], ebx
mov edx, dword [esp + 4]
mov ebx, ebp
sub ebx, esi
jle 0x408900
mov edx, ebp
mov ebp, esi
not ebp
mov dword [esp], edx
add ebp, edx
mov dword [esp + 0x1c], ebp
and ebx, 3
je 0x4089a8
lea edx, [edi + eax*4]
mov ebp, ecx
xor ecx, ecx
nop
nop
nop
nop
nop
mov word [edx], bp
inc ecx
add edx, 0xfffffffc
cmp ebx, ecx
jne 0x408990
sub eax, ecx
sub dword [esp], ecx
mov edx, dword [esp + 4]
mov ecx, ebp
jmp 0x4089ac
mov edx, dword [esp + 4]
cmp dword [esp + 0x1c], 3
mov ebp, dword [esp]
jb 0x408900
nop
nop
nop
nop
nop
nop
mov word [edi + eax*4], cx
mov word [edi + eax*4 - 4], cx
mov word [edi + eax*4 - 8], cx
mov word [edi + eax*4 - 0xc], cx
add eax, 0xfffffffc
add ebp, 0xfffffffc
cmp ebp, esi
jg 0x4089c0
jmp 0x408900
test edx, edx
jle 0x408ab5
xor eax, eax
mov edx, dword [esp + 4]
movzx ecx, word [edi + eax*4]
inc dword [esp + ecx*4 + 0x28]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, edx
jl 0x4089f0
cmp edx, 2
jl 0x408ab5
mov edx, dword [esp + 0x15c4]
cmp edx, 0x20
jge 0x408a80
mov eax, dword [esp + edx*4 + 0x28]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x408a3c
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
inc ecx
mov dword [esp + esi*4 + 0x28], eax
dec edx
jne 0x408a30
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408a78
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
mov dword [esp + edx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + edx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + edx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x38]
add ecx, 4
mov dword [esp + edx*4 + 0x28], eax
cmp ecx, 0x20
jne 0x408a50
test edx, edx
jle 0x408df5
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 + 0x24]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x408a90
mov edx, 1
mov ecx, dword [esp + 0x15c4]
shl edx, cl
cmp eax, edx
jne 0x408e00
mov eax, dword [esp + 0x14]
shl eax, 5
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x14], eax
add eax, ebx
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.004090d0
add esp, 0xc
mov eax, dword [esp + 0x20]
mov esi, ebx
add eax, ebx
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.004090d0
add esp, 0xc
cmp dword [esp + 0x15c4], 0
jle 0x408c06
add edi, 0xfffffffe
mov eax, 1
mov dword [esp + 0xc], edi
jmp 0x408b42
mov ebp, edi
mov edi, dword [esp + 4]
mov ebx, esi
mov esi, ebx
mov dword [esp + 4], edi
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15c4]
mov eax, ecx
mov edi, ebp
je 0x408c06
mov ecx, dword [esp + eax*4 + 0x28]
test ecx, ecx
jle 0x408b20
mov edx, ecx
and edx, 3
je 0x408ba0
mov dword [esp], ecx
mov ecx, dword [esp + 4]
lea ebp, [edi + ecx*4]
xor esi, esi
mov ecx, dword [esp + 0x14]
nop
nop
nop
nop
nop
nop
nop
nop
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 0x408b70
sub dword [esp + 4], esi
mov ecx, dword [esp]
mov edx, ecx
sub edx, esi
mov esi, dword [esp + 0x10]
jmp 0x408ba2
mov edx, ecx
cmp ecx, 4
mov edi, dword [esp + 4]
mov ebp, dword [esp + 0xc]
mov ebx, esi
jb 0x408b28
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [ebp + edi*4]
mov esi, dword [esp + 0x14]
add esi, ebx
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + edi*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + edi*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [ebp + edi*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add edi, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408bc0
jmp 0x408b28
mov ecx, dword [esp + 0x15c0]
mov ebx, esi
mov dword [esp + 0x930], 0
mov eax, dword [esp + 0x15c4]
cmp eax, 2
jl 0x408cb3
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408c3b
xor edx, edx
mov eax, 2
jmp 0x408c8a
mov dword [esp + 0x10], ebx
mov ebx, ecx
and ebx, 0xfffffffe
xor edx, edx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + eax*4 + 0x2c]
mov edi, dword [esp + eax*4 + 0x30]
mov ebp, esi
and ebp, edx
xor esi, edx
lea edx, [esi + ebp*2]
add edx, edx
mov dword [esp + eax*4 + 0x934], edx
mov esi, edi
and esi, edx
xor edx, edi
lea edx, [edx + esi*2]
add edx, edx
mov dword [esp + eax*4 + 0x938], edx
add eax, 2
cmp ebx, eax
jne 0x408c50
add eax, 2
mov ebx, dword [esp + 0x10]
test cl, 1
mov ecx, dword [esp + 0x15c0]
je 0x408cb3
mov ecx, dword [esp + eax*4 + 0x24]
mov esi, ecx
and esi, edx
xor ecx, edx
lea ecx, [ecx + esi*2]
add ecx, ecx
mov dword [esp + eax*4 + 0x92c], ecx
mov ecx, dword [esp + 0x15c0]
test ecx, ecx
jle 0x408d82
xor eax, eax
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, ebx
shl ecx, 6
add ecx, ebx
mov dword [esp], ecx
jmp 0x408cf9
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], bx
inc eax
cmp eax, dword [esp + 0x15c0]
je 0x408d82
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408ceb
mov ebp, dword [esp + ecx*4 + 0x92c]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x92c], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x408d5f
and ecx, 0xfffffffc
xor ebx, ebx
nop
nop
nop
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 0x408d30
test edi, edi
je 0x408ce0
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 0x408d70
jmp 0x408ce0
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esi
and ecx, 0xfffffffe
lea edx, [eax + ebx]
add edx, 0x8194
xor eax, eax
xor edi, edi
jmp 0x408dbb
add eax, 2
cmp ecx, eax
je 0x408552
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408dd6
mov word [esp + edi*4 + 0x4ac], si
mov word [esp + edi*4 + 0x4ae], ax
inc edi
movzx esi, word [edx + eax*2]
test si, si
je 0x408db0
mov word [esp + edi*4 + 0x4ac], si
lea esi, [eax + 1]
mov word [esp + edi*4 + 0x4ae], si
inc edi
jmp 0x408db0
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
mov ebp, edi
mov edi, dword [esp + 0x15c4]
mov esi, edi
or esi, 0xfffffffe
and edi, 0xfffffffe
lea ecx, [esi + edi]
inc ecx
add esi, edi
add esi, 2
mov dword [esp], esi
mov edi, ebp
jmp 0x408e43
dec esi
mov dword [esp + ebp*4 + 0x24], esi
add dword [esp + ebp*4 + 0x28], 2
dec eax
cmp eax, edx
je 0x408ab5
mov esi, dword [esp + 0x15c4]
dec dword [esp + esi*4 + 0x28]
test ecx, ecx
jle 0x408e3a
mov ebp, dword [esp]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + ebp*4 + 0x24]
test esi, esi
jne 0x408e30
dec ebp
cmp ebp, 1
jg 0x408e60
jmp 0x408e3a