Function at 0x408300
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b8
call fcn.00408d10
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15cc]
lea eax, [esp + 0x34]
push 0x84
push 0
push eax
call fcn.00408ee0
add esp, 0xc
cmp dword [esp + 0x15d4], 0
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], ebx
je 0x4083c7
test esi, esi
mov ebx, dword [esp + 0x15d0]
jle 0x408ba6
xor eax, eax
cmp dword [esp + 0x15cc], 1
je 0x408398
mov ecx, dword [esp + 0x15cc]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0x10]
add edx, eax
add edx, 0x8f13
xor eax, eax
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 0x408380
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x408ba6
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x10]
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x34]
jmp 0x408ba6
lea eax, [ebx + ebx*8]
mov dword [esp + 0x14], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x24], eax
jle 0x4084ce
cmp esi, 1
jne 0x4084f7
xor eax, eax
xor ebp, ebp
mov ebx, dword [esp + 0x15d0]
mov ecx, dword [esp + 0x15cc]
test cl, 1
je 0x408427
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
add ecx, edx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x408427
mov word [esp + ebp*4 + 0x4b8], cx
mov word [esp + ebp*4 + 0x4ba], ax
inc ebp
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.00408ee0
add esp, 0xc
test ebp, ebp
sete byte [esp + 0xb]
je 0x408565
mov ecx, ebp
xor eax, eax
cmp ebp, 1
je 0x40849f
mov ecx, ebp
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0x4b8]
movzx esi, dl
inc dword [esp + esi*4 + 0x938]
shr edx, 8
inc dword [esp + edx*4 + 0xd38]
movzx edx, word [esp + eax*4 + 0x4bc]
movzx esi, dl
inc dword [esp + esi*4 + 0x938]
shr edx, 8
inc dword [esp + edx*4 + 0xd38]
add eax, 2
cmp ecx, eax
jne 0x408460
mov edx, ebp
test dl, 1
je 0x4084c2
movzx eax, word [esp + eax*4 + 0x4b8]
movzx ecx, al
inc dword [esp + ecx*4 + 0x938]
shr eax, 8
inc dword [esp + eax*4 + 0xd38]
mov eax, dword [esp + 0xd38]
jmp 0x40856e
lea eax, [esp + 0x938]
push 0x800
push 0
push eax
call fcn.00408ee0
add esp, 0xc
xor edx, edx
mov byte [esp + 0xb], 1
xor eax, eax
mov ebx, dword [esp + 0x15d0]
jmp 0x40856e
mov ecx, esi
and ecx, 0xfffffffe
mov edx, dword [esp + 0x10]
add edx, eax
add edx, 0x8194
xor eax, eax
xor ebp, ebp
mov ebx, dword [esp + 0x15d0]
jmp 0x40852b
add eax, 2
cmp ecx, eax
je 0x4083f1
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x408546
mov word [esp + ebp*4 + 0x4b8], si
mov word [esp + ebp*4 + 0x4ba], ax
inc ebp
movzx esi, word [edx + eax*2]
test si, si
je 0x408520
mov word [esp + ebp*4 + 0x4b8], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0x4ba], si
inc ebp
jmp 0x408520
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 + 0x30], eax
lea eax, [edx - 1]
mov dword [esp + 0x1c], eax
mov dword [esp + 4], edx
and edx, 0xfffffffe
mov dword [esp + 0x20], edx
lea esi, [esp + 0x1138]
lea edx, [esp + 0x4b8]
xor ecx, ecx
lea eax, [esp + 0x938]
mov dword [esp + 0x28], 0
jmp 0x4085de
mov edi, dword [esp + 0x28]
inc edi
add ecx, 8
add eax, 0x400
mov edx, dword [esp]
mov dword [esp + 0x28], edi
cmp edi, dword [esp + 0x30]
je 0x4086e3
mov dword [esp], esi
mov esi, edx
mov ebp, 3
xor edx, edx
nop
nop
nop
nop
nop
nop
mov dword [esp + ebp*4 + 0xac], edx
add edx, dword [eax + ebp*4 - 0xc]
mov dword [esp + ebp*4 + 0xb0], edx
add edx, dword [eax + ebp*4 - 8]
mov dword [esp + ebp*4 + 0xb4], edx
add edx, dword [eax + ebp*4 - 4]
mov dword [esp + ebp*4 + 0xb8], edx
add edx, dword [eax + ebp*4]
add ebp, 4
cmp ebp, 0x103
jne 0x4085f0
cmp byte [esp + 0xb], 0
jne 0x4085c0
mov dword [esp + 0x2c], eax
mov dword [esp + 0xc], esi
cmp dword [esp + 0x1c], 0
je 0x408694
xor ebp, ebp
nop
nop
mov eax, dword [esp + 0xc]
movzx edx, word [eax + ebp*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0xb8]
lea edi, [ebx + 1]
mov dword [esp + edx*4 + 0xb8], edi
mov edx, dword [eax + ebp*4]
mov esi, dword [esp]
mov dword [esi + ebx*4], edx
movzx edx, word [eax + ebp*4 + 4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb8]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb8], ebx
mov edx, dword [eax + ebp*4 + 4]
mov dword [esi + edi*4], edx
add ebp, 2
cmp dword [esp + 0x20], ebp
jne 0x408640
jmp 0x408696
xor ebp, ebp
test byte [esp + 4], 1
mov ebx, dword [esp + 0x15d0]
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x2c]
je 0x4085c0
movzx edx, word [esi + ebp*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0xb8]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0xb8], ebx
mov ebx, dword [esp + 0x15d0]
mov edx, dword [esi + ebp*4]
mov esi, dword [esp]
mov dword [esi + edi*4], edx
mov esi, dword [esp + 0xc]
jmp 0x4085c0
cmp dword [esp + 4], 0
je 0x408a62
mov ecx, dword [esp + 4]
cmp ecx, 1
jne 0x408704
mov eax, dword [esp]
mov word [eax], 1
jmp 0x40893d
mov edx, dword [esp]
movzx eax, word [edx + 4]
add word [edx], ax
cmp ecx, 3
jl 0x4087bc
mov ebx, 2
mov edi, 2
sub edi, ecx
xor edx, edx
mov esi, 1
mov dword [esp + 0xc], edi
mov eax, dword [esp]
jmp 0x408757
movzx ecx, word [eax + edx*4]
add word [eax + esi*4], cx
mov word [eax + edx*4], si
inc edx
lea ecx, [edi + esi]
inc ecx
inc esi
cmp ecx, 1
je 0x4087cb
movzx ecx, word [eax + edx*4]
cmp ebx, dword [esp + 4]
jge 0x40876a
movzx ebp, word [eax + ebx*4]
cmp cx, bp
jae 0x408780
mov word [eax + esi*4], cx
mov word [eax + edx*4], si
inc edx
cmp ebx, dword [esp + 4]
jge 0x408740
jmp 0x40878b
inc ebx
mov word [eax + esi*4], bp
cmp ebx, dword [esp + 4]
jge 0x408740
cmp edx, esi
jge 0x4087a0
movzx ecx, word [eax + edx*4]
movzx ebp, word [eax + ebx*4]
cmp cx, bp
jb 0x408744
jmp 0x4087a4
movzx ebp, word [eax + ebx*4]
movzx ecx, word [eax + esi*4]
inc ebx
mov edi, ecx
and edi, ebp
xor ecx, ebp
lea ecx, [ecx + edi*2]
mov edi, dword [esp + 0xc]
mov word [eax + esi*4], cx
jmp 0x40874d
lea edi, [ecx - 2]
mov word [edx + ecx*4 - 8], 0
jmp 0x408861
mov eax, dword [esp + 4]
mov edi, dword [esp]
mov word [edi + eax*4 - 8], 0
lea edx, [eax - 3]
lea ecx, [eax + 2]
mov eax, edx
and ecx, 3
je 0x408801
mov eax, edx
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 ecx
jne 0x4087f0
mov ecx, dword [esp + 4]
lea edi, [ecx - 2]
cmp edx, 3
jb 0x408861
inc eax
mov edx, dword [esp]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [edx + eax*4 - 4]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 4], cx
movzx ecx, word [edx + eax*4 - 8]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 8], cx
movzx ecx, word [edx + eax*4 - 0xc]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0xc], cx
movzx ecx, word [edx + eax*4 - 0x10]
movzx ecx, word [edx + ecx*4]
inc ecx
mov word [edx + eax*4 - 0x10], cx
add eax, 0xfffffffc
jne 0x408820
xor edx, edx
mov esi, 1
mov eax, dword [esp + 0x1c]
jmp 0x408884
mov esi, ebp
add esi, ebp
inc edx
test ebp, ebp
mov ebx, dword [esp + 0x15d0]
jle 0x408932
test edi, edi
js 0x4088b0
lea ebx, [edi + 1]
xor ebp, ebp
nop
nop
nop
mov ecx, dword [esp]
movzx ecx, word [ecx + edi*4]
cmp edx, ecx
jne 0x4088b2
inc ebp
add edi, 0xffffffff
jb 0x408890
mov edi, 0xffffffff
mov ebp, ebx
jmp 0x4088b2
xor ebp, ebp
mov ebx, esi
sub ebx, ebp
jle 0x408870
mov ecx, ebp
not ecx
add ecx, esi
and ebx, 3
mov dword [esp + 0xc], ebp
je 0x4088f3
mov dword [esp + 0x20], ecx
mov ecx, dword [esp]
lea ecx, [ecx + eax*4]
xor ebp, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ecx], dx
inc ebp
add ecx, 0xfffffffc
cmp ebx, ebp
jne 0x4088e0
sub esi, ebp
sub eax, ebp
mov ecx, dword [esp + 0x20]
cmp ecx, 3
mov ecx, dword [esp]
mov ebp, dword [esp + 0xc]
jb 0x408870
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ecx + eax*4], dx
mov word [ecx + eax*4 - 4], dx
mov word [ecx + eax*4 - 8], dx
mov word [ecx + eax*4 - 0xc], dx
add eax, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ebp
jg 0x408910
jmp 0x408870
cmp dword [esp + 4], 0
jle 0x408a62
mov eax, dword [esp + 4]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x1c], 3
mov edi, dword [esp]
jb 0x40898a
mov edx, dword [esp + 4]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x34]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x34]
add ecx, 4
cmp edx, ecx
jne 0x408960
test eax, eax
je 0x4089ad
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 0x4089a0
cmp dword [esp + 4], 2
jl 0x408a62
lea eax, [ebx + 1]
cmp eax, 0x21
jge 0x408a1c
mov ecx, dword [esp + ebx*4 + 0x34]
mov edx, ebx
neg edx
and edx, 3
je 0x4089dc
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x34]
mov dword [esp + ebx*4 + 0x34], ecx
inc eax
dec edx
jne 0x4089d0
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x408a18
add eax, 3
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + ebx*4 + 0x34], ecx
add ecx, dword [esp + eax*4 + 0x2c]
mov dword [esp + ebx*4 + 0x34], ecx
add ecx, dword [esp + eax*4 + 0x30]
mov dword [esp + ebx*4 + 0x34], ecx
add ecx, dword [esp + eax*4 + 0x34]
mov dword [esp + ebx*4 + 0x34], ecx
add eax, 4
cmp eax, 0x24
jne 0x4089f0
test ebx, ebx
jle 0x408a52
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
nop
nop
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 0x408a30
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x408ccd
jmp 0x408a62
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x408ccd
mov ebp, dword [esp + 0x14]
shl ebp, 5
mov edi, dword [esp + 0x10]
mov esi, ebp
lea eax, [edi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408ee0
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, edi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.00408ee0
add esp, 0xc
test ebx, ebx
jle 0x408ba6
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0x14], esi
jmp 0x408ae0
mov ebx, dword [esp + 4]
mov edi, esi
mov esi, edi
mov dword [esp + 4], ebx
lea ecx, [eax + 1]
mov ebx, dword [esp + 0x15d0]
cmp eax, ebx
mov eax, ecx
je 0x408ba6
mov ecx, dword [esp + eax*4 + 0x34]
test ecx, ecx
jle 0x408ac0
mov edx, ecx
and edx, 3
je 0x408b40
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 4]
mov edi, dword [esp]
lea ebp, [edi + esi*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, word [ebp]
mov ebx, dword [esp + 0x14]
add ebx, ecx
mov byte [edi + ebx + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x408b10
mov ecx, dword [esp + 0xc]
mov edx, ecx
sub edx, esi
sub dword [esp + 4], esi
mov esi, dword [esp + 0x14]
jmp 0x408b42
mov edx, ecx
cmp ecx, 4
mov ebx, dword [esp + 4]
mov ebp, dword [esp]
mov edi, esi
jb 0x408ac6
dec edx
nop
nop
nop
nop
nop
nop
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 0x408b60
jmp 0x408ac6
mov dword [esp + 0x93c], 0
cmp ebx, 2
jl 0x408bdc
xor eax, eax
mov ecx, 2
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x30]
add eax, eax
mov dword [esp + ecx*4 + 0x938], eax
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
cmp ecx, ebx
jle 0x408bc0
cmp dword [esp + 0x15cc], 0
jle 0x408cc2
xor eax, eax
mov ecx, dword [esp + 0x18]
lea esi, [ecx + ecx*8]
mov edx, esi
shl edx, 5
mov ecx, dword [esp + 0x10]
add edx, ecx
shl esi, 6
add esi, ecx
mov dword [esp], esi
jmp 0x408c33
mov ecx, dword [esp]
mov word [ecx + eax*2 + 0x8852], bx
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, dword [esp + 0x15cc]
jge 0x408cc2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408c1b
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 0x408c9f
and ecx, 0xfffffffc
xor ebx, ebx
nop
nop
nop
nop
nop
nop
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 0x408c70
test edi, edi
je 0x408c10
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 0x408cb0
jmp 0x408c10
add esp, 0x15b8
pop esi
pop edi
pop ebx
pop ebp
ret
dec dword [esp + ebx*4 + 0x34]
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408cf8
mov esi, dword [esp + ecx*4 + 0x30]
dec ecx
test esi, esi
je 0x408ce0
dec esi
mov dword [esp + ecx*4 + 0x34], esi
add dword [esp + ecx*4 + 0x38], 2
dec eax
cmp eax, edx
jne 0x408ccd
jmp 0x408a62