Function at 0x4082a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b8
call fcn.00408ca0
mov edi, edx
mov ebx, ecx
mov esi, dword [esp + 0x15cc]
lea eax, [esp + 0x34]
push 0x84
push 0
push eax
call fcn.00408e70
add esp, 0xc
cmp dword [esp + 0x15d4], 0
mov dword [esp + 0x14], edi
je 0x40835c
test esi, esi
mov ecx, esi
jle 0x408a71
xor eax, eax
cmp ecx, 1
je 0x408328
mov ecx, dword [esp + 0x15cc]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + ebx]
add edx, 0x8f13
xor eax, eax
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x34]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x34]
add eax, 2
cmp ecx, eax
jne 0x408310
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x408a71
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, ebx
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15cc]
inc dword [esp + eax*4 + 0x34]
jmp 0x408a71
lea eax, [edi + edi*8]
mov dword [esp + 0x28], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], eax
jle 0x40841c
cmp esi, 1
jne 0x408bcd
mov edi, ebx
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x4083b7
mov ecx, dword [esp + 0x20]
add ecx, edi
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x4083b7
mov word [esp + ebx*4 + 0x4b8], cx
mov word [esp + ebx*4 + 0x4ba], ax
inc ebx
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.00408e70
add esp, 0xc
test ebx, ebx
sete byte [esp + 7]
je 0x408433
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esp + eax*4 + 0x4b8]
movzx edx, cl
mov esi, dword [esp + edx*4 + 0x938]
mov edi, esi
and edi, 1
xor esi, 1
lea esi, [esi + edi*2]
mov dword [esp + edx*4 + 0x938], esi
shr ecx, 8
inc dword [esp + ecx*4 + 0xd38]
inc eax
cmp ebx, eax
jne 0x4083e0
mov eax, dword [esp + 0xd38]
jmp 0x40843c
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.00408e70
add esp, 0xc
xor ebx, ebx
mov byte [esp + 7], 1
xor eax, eax
xor ecx, ecx
cmp eax, ebx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x30], eax
lea eax, [ebx - 1]
mov dword [esp + 0x18], eax
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x4b8]
mov dword [esp], eax
lea eax, [esp + 0x1138]
xor ecx, ecx
lea esi, [esp + 0x938]
xor edx, edx
mov dword [esp + 8], ebx
jmp 0x408496
inc edx
add ecx, 8
add esi, 0x400
mov eax, edi
cmp edx, dword [esp + 0x30]
je 0x4085b3
mov edi, dword [esp]
mov dword [esp], eax
mov ebp, 3
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + ebp*4 + 0xac], eax
add eax, dword [esi + ebp*4 - 0xc]
mov dword [esp + ebp*4 + 0xb0], eax
add eax, dword [esi + ebp*4 - 8]
mov dword [esp + ebp*4 + 0xb4], eax
add eax, dword [esi + ebp*4 - 4]
mov dword [esp + ebp*4 + 0xb8], eax
add eax, dword [esi + ebp*4]
add ebp, 4
cmp ebp, 0x103
jne 0x4084b0
cmp byte [esp + 7], 0
jne 0x408480
mov dword [esp + 0x2c], esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x24], edx
cmp dword [esp + 0x18], 0
je 0x408564
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + 0xc]
movzx eax, word [esi + ebp*4]
shr eax, cl
movzx eax, al
mov ebx, dword [esp + eax*4 + 0xb8]
lea edx, [ebx + 1]
mov dword [esp + eax*4 + 0xb8], edx
mov eax, dword [esi + ebp*4]
mov edi, dword [esp]
mov dword [edi + ebx*4], eax
movzx eax, word [esi + ebp*4 + 4]
shr eax, cl
movzx eax, al
mov edx, dword [esp + eax*4 + 0xb8]
lea ebx, [edx + 1]
mov dword [esp + eax*4 + 0xb8], ebx
mov eax, dword [esi + ebp*4 + 4]
mov dword [edi + edx*4], eax
add ebp, 2
cmp dword [esp + 0x1c], ebp
jne 0x408510
jmp 0x408566
xor ebp, ebp
mov ebx, dword [esp + 8]
test bl, 1
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x2c]
je 0x408480
movzx eax, word [edi + ebp*4]
shr eax, cl
movzx eax, al
mov edx, dword [esp + eax*4 + 0xb8]
lea ebx, [edx + 1]
mov dword [esp + eax*4 + 0xb8], ebx
mov ebx, dword [esp + 8]
mov eax, dword [edi + ebp*4]
mov edi, dword [esp]
mov dword [edi + edx*4], eax
mov edi, dword [esp + 0xc]
mov edx, dword [esp + 0x24]
jmp 0x408480
test ebx, ebx
je 0x408945
mov ebx, dword [esp + 8]
cmp ebx, 1
jne 0x4085d1
mov eax, dword [esp]
mov word [eax], 1
jmp 0x40881a
mov edi, dword [esp]
movzx eax, word [edi + 4]
add word [edi], ax
cmp ebx, 3
jl 0x40868d
mov eax, 2
mov ecx, 2
sub ecx, ebx
xor edx, edx
mov esi, 1
jmp 0x408621
movzx ebx, word [ebp + edx*4]
add word [ebp + esi*4], bx
mov word [ebp + edx*4], si
inc edx
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
mov ebx, dword [esp + 8]
mov edi, dword [esp]
je 0x40868d
mov ebp, edi
movzx edi, word [edi + edx*4]
cmp eax, ebx
jge 0x408635
movzx ebx, word [ebp + eax*4]
cmp di, bx
jae 0x408650
mov word [ebp + esi*4], di
mov word [ebp + edx*4], si
inc edx
cmp eax, dword [esp + 8]
jge 0x408600
jmp 0x40865c
inc eax
mov word [ebp + esi*4], bx
cmp eax, dword [esp + 8]
jge 0x408600
cmp edx, esi
jge 0x408680
movzx ebx, word [ebp + edx*4]
movzx edi, word [ebp + eax*4]
cmp bx, di
jb 0x408605
jmp 0x408685
movzx edi, word [ebp + eax*4]
inc eax
add word [ebp + esi*4], di
jmp 0x408610
mov word [edi + ebx*4 - 8], 0
mov ecx, ebx
add ecx, 0xfffffffd
js 0x408711
lea edx, [ebx + 2]
mov eax, ecx
and edx, 3
je 0x4086c1
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 0x4086b0
cmp ecx, 3
jb 0x408711
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 0x4086d0
lea ecx, [ebx - 2]
mov esi, 1
xor edx, edx
mov eax, dword [esp + 0x18]
jmp 0x408756
mov esi, ebp
and esi, 2
mov edi, ebp
or ebp, 2
imul ebp, esi
xor esi, 2
and edi, 0x7ffffffd
imul edi, esi
add ebp, edi
inc edx
mov esi, ebp
test ebp, ebp
jle 0x408812
test ecx, ecx
js 0x408780
lea ebp, [ecx + 1]
xor edi, edi
nop
mov ebx, dword [esp]
movzx ebx, word [ebx + ecx*4]
cmp edx, ebx
jne 0x408790
inc edi
dec ecx
cmp ebp, edi
jne 0x408760
mov ecx, 0xffffffff
jmp 0x408792
xor ebp, ebp
jmp 0x408796
mov ebp, edi
mov ebx, dword [esp + 8]
mov edi, esi
sub edi, ebp
jle 0x408730
mov ebx, ebp
not ebp
add ebp, esi
mov dword [esp + 0xc], ebp
and edi, 3
je 0x4087d9
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp]
lea ebx, [ebx + eax*4]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx], dx
inc ebp
add ebx, 0xfffffffc
cmp edi, ebp
jne 0x4087c0
sub esi, ebp
sub eax, ebp
mov ebx, dword [esp + 8]
mov ebp, dword [esp + 0x1c]
jmp 0x4087df
mov ebp, ebx
mov ebx, dword [esp + 8]
cmp dword [esp + 0xc], 3
mov edi, dword [esp]
jb 0x408730
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 0x4087f0
jmp 0x408730
test ebx, ebx
jle 0x408945
mov edi, dword [esp + 8]
mov eax, edi
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x18], 3
mov ebx, dword [esp]
jb 0x40886a
mov edx, edi
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ebx + ecx*4]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [ebx + ecx*4 + 4]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [ebx + ecx*4 + 8]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [ebx + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x34]
add ecx, 4
cmp edx, ecx
jne 0x408840
test eax, eax
je 0x40888d
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 + 0x34]
inc edx
cmp eax, edx
jne 0x408880
cmp edi, 2
jl 0x408945
mov edx, dword [esp + 0x15d0]
lea eax, [edx + 1]
cmp eax, 0x21
jge 0x408910
mov ecx, dword [esp + edx*4 + 0x34]
neg edx
mov esi, dword [esp + 0x15d0]
and edx, 3
je 0x4088cc
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x34]
mov dword [esp + esi*4 + 0x34], ecx
inc eax
dec edx
jne 0x4088c0
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x408908
add eax, 3
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + edx*4 + 0x34], ecx
add ecx, dword [esp + eax*4 + 0x2c]
mov dword [esp + edx*4 + 0x34], ecx
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + edx*4 + 0x34], ecx
add ecx, dword [esp + eax*4 + 0x34]
mov dword [esp + edx*4 + 0x34], ecx
add eax, 4
cmp eax, 0x24
jne 0x4088e0
test edx, edx
jle 0x408c35
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 + 0x30]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x408920
mov edx, 1
mov ecx, dword [esp + 0x15d0]
shl edx, cl
cmp eax, edx
jne 0x408c40
mov edi, dword [esp + 0x28]
shl edi, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + edi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408e70
add esp, 0xc
mov eax, dword [esp + 0x20]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408e70
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov ebx, dword [esp + 8]
jle 0x408a66
add dword [esp], 0xfffffffe
mov eax, 1
jmp 0x4089b2
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15d0]
mov eax, ecx
je 0x408a66
mov ebp, dword [esp + eax*4 + 0x34]
test ebp, ebp
jle 0x4089a0
mov edx, ebp
and edx, 3
je 0x408a10
mov dword [esp + 0xc], ebp
mov ecx, edi
mov dword [esp + 8], ebx
mov esi, dword [esp]
lea edi, [esi + ebx*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov ebp, dword [esp + 0x10]
add ebp, ecx
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x4089e0
mov ebp, dword [esp + 0xc]
mov edx, ebp
sub edx, esi
mov ebx, dword [esp + 8]
sub ebx, esi
mov edi, ecx
jmp 0x408a12
mov edx, ebp
cmp ebp, 4
mov ebp, dword [esp]
jb 0x4089a0
dec edx
nop
nop
nop
nop
nop
movzx ecx, word [ebp + ebx*4]
mov esi, dword [esp + 0x10]
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
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408a20
jmp 0x4089a0
mov ecx, dword [esp + 0x15cc]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x93c], 0
mov eax, dword [esp + 0x15d0]
cmp eax, 2
jl 0x408aef
lea ecx, [eax - 1]
cmp eax, 2
jne 0x408a99
xor eax, eax
mov edx, 2
jmp 0x408ad6
mov esi, ebx
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
add eax, dword [esp + edx*4 + 0x3c]
add eax, eax
mov dword [esp + edx*4 + 0x944], eax
add edx, 2
cmp ebx, edx
jne 0x408ab0
add edx, 2
mov ebx, esi
test cl, 1
mov ecx, dword [esp + 0x15cc]
je 0x408aef
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0x938], eax
test ecx, ecx
jle 0x408bc2
xor eax, eax
mov ecx, dword [esp + 0x14]
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 0x408b39
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], bx
inc eax
cmp eax, dword [esp + 0x15cc]
je 0x408bc2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408b2b
mov ebp, dword [esp + ecx*4 + 0x938]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x938], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x408b9f
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 0x408b70
test edi, edi
je 0x408b20
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 0x408bb0
jmp 0x408b20
add esp, 0x15b8
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esi
and ecx, 0xfffffffe
mov edi, ebx
lea edx, [eax + ebx]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x408bfb
add eax, 2
cmp ecx, eax
je 0x408385
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408c16
mov word [esp + ebx*4 + 0x4b8], si
mov word [esp + ebx*4 + 0x4ba], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x408bf0
mov word [esp + ebx*4 + 0x4b8], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0x4ba], si
inc ebx
jmp 0x408bf0
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
mov edi, dword [esp + 0x15d0]
mov esi, edi
xor esi, 0xfffffffe
and edi, 0xfffffffe
lea ecx, [esi + edi*2]
inc ecx
lea esi, [esi + edi*2]
add esi, 2
jmp 0x408c73
dec ebx
mov dword [esp + edi*4 + 0x30], ebx
add dword [esp + edi*4 + 0x34], 2
dec eax
cmp eax, edx
je 0x408945
mov edi, dword [esp + 0x15d0]
dec dword [esp + edi*4 + 0x34]
test ecx, ecx
jle 0x408c6a
mov edi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, dword [esp + edi*4 + 0x30]
test ebx, ebx
jne 0x408c60
dec edi
cmp edi, 1
jg 0x408c90
jmp 0x408c6a