Function at 0x4083c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b0
call fcn.00408cd0
mov ebx, edx
mov edi, ecx
mov esi, dword [esp + 0x15c4]
lea eax, [esp + 0x2c]
push 0x84
push 0
push eax
call fcn.00408d90
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov dword [esp + 0x10], edi
mov dword [esp + 0x20], ebx
je 0x408440
test esi, esi
mov ebx, dword [esp + 0x15c8]
jle 0x408b4d
xor eax, eax
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0x10]
nop
nop
movzx edx, byte [eax + ecx + 0x8f12]
inc dword [esp + edx*4 + 0x2c]
mov edx, eax
and edx, 1
xor eax, 1
lea eax, [eax + edx*2]
cmp eax, esi
jl 0x408420
jmp 0x408b4d
lea eax, [ebx + ebx*8]
mov dword [esp + 0x18], eax
shl eax, 6
test esi, esi
mov dword [esp + 0x24], eax
jle 0x408539
add eax, edi
add eax, 0x8192
xor ebx, ebx
xor ecx, ecx
jmp 0x40847f
mov edx, ecx
and edx, 1
xor ecx, 1
lea ecx, [ecx + edx*2]
cmp ecx, esi
jge 0x40849b
movzx edx, word [eax + ecx*2]
test dx, dx
je 0x408470
mov word [esp + ebx*4 + 0xcb0], dx
mov word [esp + ebx*4 + 0xcb2], cx
inc ebx
jmp 0x408470
lea eax, [esp + 0xb0]
push 0x800
push 0
push eax
call fcn.00408d90
add esp, 0xc
test ebx, ebx
sete byte [esp + 0xc]
je 0x408550
xor eax, eax
cmp ebx, 1
je 0x40850f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xcb0]
movzx esi, dl
inc dword [esp + esi*4 + 0xb0]
shr edx, 8
inc dword [esp + edx*4 + 0x4b0]
movzx edx, word [esp + eax*4 + 0xcb4]
movzx esi, dl
inc dword [esp + esi*4 + 0xb0]
shr edx, 8
inc dword [esp + edx*4 + 0x4b0]
add eax, 2
cmp ecx, eax
jne 0x4084d0
test bl, 1
je 0x408530
movzx eax, word [esp + eax*4 + 0xcb0]
movzx ecx, al
inc dword [esp + ecx*4 + 0xb0]
shr eax, 8
inc dword [esp + eax*4 + 0x4b0]
mov eax, dword [esp + 0x4b0]
jmp 0x408559
lea eax, [esp + 0xb0]
push 0x800
push 0
push eax
call fcn.00408d90
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0xc], 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 + 0x14], eax
mov dword [esp + 4], ebx
and ebx, 0xfffffffe
lea esi, [esp + 0x1130]
lea eax, [esp + 0xcb0]
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x28], ebp
mov dword [esp + 8], ebx
jmp 0x4085b3
mov edx, dword [esp + 0x1c]
inc edx
add ecx, 8
mov eax, dword [esp]
cmp edx, ebp
je 0x40868a
mov dword [esp], esi
mov esi, eax
mov dword [esp + 0x1c], edx
mov eax, edx
shl eax, 0xa
add eax, esp
add eax, 0xb0
xor edi, edi
xor edx, edx
nop
nop
nop
nop
mov dword [esp + edi*4 + 0x8b0], edx
add edx, dword [eax + edi*4]
mov ebx, edi
xor ebx, 1
and edi, 1
lea edi, [ebx + edi*2]
cmp edi, 0x100
jb 0x4085d0
cmp byte [esp + 0xc], 0
jne 0x4085a0
cmp dword [esp + 0x14], 0
je 0x408651
xor eax, eax
mov ebp, dword [esp]
movzx edx, word [esi + eax*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0x8b0]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0x8b0], ebx
mov edx, dword [esi + eax*4]
mov dword [ebp + edi*4], edx
movzx edx, word [esi + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0x8b0]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0x8b0], ebx
mov edx, dword [esi + eax*4 + 4]
mov dword [ebp + edi*4], edx
mov ebx, dword [esp + 8]
add eax, 2
cmp ebx, eax
jne 0x408600
jmp 0x408653
xor eax, eax
test byte [esp + 4], 1
mov ebp, dword [esp + 0x28]
je 0x4085a0
movzx edx, word [esi + eax*4]
shr edx, cl
movzx edx, dl
mov edi, dword [esp + edx*4 + 0x8b0]
lea ebx, [edi + 1]
mov dword [esp + edx*4 + 0x8b0], ebx
mov eax, dword [esi + eax*4]
mov edx, dword [esp]
mov dword [edx + edi*4], eax
jmp 0x4085a0
cmp dword [esp + 4], 0
mov ebx, dword [esp + 0x15c8]
je 0x408a22
cmp dword [esp + 4], 1
jne 0x4086b0
mov eax, dword [esp]
mov word [eax], 1
jmp 0x4088fd
mov ecx, dword [esp]
movzx eax, word [ecx + 4]
add word [ecx], ax
cmp dword [esp + 0x14], 2
jl 0x408770
mov eax, 2
mov ecx, 2
sub ecx, dword [esp + 4]
xor edx, edx
mov esi, 1
jmp 0x408701
mov ebp, dword [esp]
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
je 0x408787
mov ebp, dword [esp]
movzx edi, word [ebp + edx*4]
cmp eax, dword [esp + 4]
jge 0x408719
movzx ebx, word [ebp + eax*4]
cmp di, bx
jae 0x408730
mov word [ebp + esi*4], di
mov word [ebp + edx*4], si
inc edx
jmp 0x408736
inc eax
mov word [ebp + esi*4], bx
mov edi, dword [esp + 4]
cmp eax, edi
jge 0x4086e0
cmp edx, esi
jge 0x408760
mov ebp, dword [esp]
movzx ebx, word [ebp + edx*4]
movzx edi, word [ebp + eax*4]
cmp bx, di
jb 0x4086e8
jmp 0x408768
mov ebp, dword [esp]
movzx edi, word [ebp + eax*4]
inc eax
add word [ebp + esi*4], di
jmp 0x4086f3
mov eax, ecx
mov edx, ecx
mov eax, dword [esp + 4]
lea ecx, [eax - 2]
mov word [edx + eax*4 - 8], 0
jmp 0x408811
mov eax, dword [esp + 4]
lea ecx, [eax - 2]
mov edx, dword [esp]
mov word [edx + eax*4 - 8], 0
cmp eax, 3
jl 0x408811
lea edx, [eax - 3]
lea esi, [eax + 2]
mov eax, edx
and esi, 3
mov ebx, dword [esp]
je 0x4087c1
mov eax, edx
nop
movzx edi, word [ebx + eax*4]
movzx edi, word [ebx + edi*4]
inc edi
mov word [ebx + eax*4], di
dec eax
dec esi
jne 0x4087b0
cmp edx, 3
jb 0x408811
inc eax
mov esi, dword [esp]
nop
nop
nop
nop
nop
nop
movzx edx, word [esi + eax*4 - 4]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 4], dx
movzx edx, word [esi + eax*4 - 8]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 8], dx
movzx edx, word [esi + eax*4 - 0xc]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 0xc], dx
movzx edx, word [esi + eax*4 - 0x10]
movzx edx, word [esi + edx*4]
inc edx
mov word [esi + eax*4 - 0x10], dx
add eax, 0xfffffffc
jne 0x4087d0
xor edx, edx
mov esi, 1
mov eax, dword [esp + 0x14]
jmp 0x408834
mov esi, ebp
add esi, ebp
inc edx
test ebp, ebp
mov ebx, dword [esp + 0x15c8]
jle 0x4088f2
test ecx, ecx
js 0x408860
lea ebp, [ecx + 1]
xor edi, edi
nop
nop
nop
mov ebx, dword [esp]
movzx ebx, word [ebx + ecx*4]
cmp edx, ebx
jne 0x408870
inc edi
dec ecx
cmp ebp, edi
jne 0x408840
mov ecx, 0xffffffff
jmp 0x408872
xor ebp, ebp
jmp 0x408872
mov ebp, edi
mov edi, esi
sub edi, ebp
jle 0x408820
mov ebx, ebp
not ebx
add ebx, esi
and edi, 3
mov dword [esp + 0x1c], edi
mov dword [esp + 8], ebp
je 0x4088b3
mov dword [esp + 0xc], ebx
mov edi, dword [esp]
lea edi, [edi + eax*4]
xor ebx, ebx
mov ebp, dword [esp + 0x1c]
nop
nop
nop
nop
nop
mov word [edi], dx
inc ebx
add edi, 0xfffffffc
cmp ebp, ebx
jne 0x4088a0
sub esi, ebx
sub eax, ebx
mov ebx, dword [esp + 0xc]
cmp ebx, 3
mov ebx, dword [esp]
mov ebp, dword [esp + 8]
jb 0x408820
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebx + eax*4], dx
mov word [ebx + eax*4 - 4], dx
mov word [ebx + eax*4 - 8], dx
mov word [ebx + eax*4 - 0xc], dx
add eax, 0xfffffffc
add esi, 0xfffffffc
cmp esi, ebp
jg 0x4088d0
jmp 0x408820
cmp dword [esp + 4], 0
jle 0x408a22
mov ebp, ebx
mov eax, dword [esp + 4]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x14], 3
mov ebx, dword [esp]
jb 0x40894a
mov edx, dword [esp + 4]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
movzx esi, word [ebx + ecx*4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 4]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + ecx*4 + 8]
inc dword [esp + esi*4 + 0x2c]
movzx esi, word [ebx + 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]
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 + 0x2c]
inc edx
cmp eax, edx
jne 0x408960
cmp dword [esp + 4], 2
mov ebx, ebp
jl 0x408a22
lea eax, [ebx + 1]
cmp eax, 0x21
jge 0x4089dc
mov ecx, dword [esp + ebx*4 + 0x2c]
mov edx, ebx
neg edx
and edx, 3
je 0x40899c
nop
add ecx, dword [esp + eax*4 + 0x2c]
mov dword [esp + ebx*4 + 0x2c], ecx
inc eax
dec edx
jne 0x408990
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x4089d8
add eax, 3
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + eax*4 + 0x20]
mov dword [esp + ebx*4 + 0x2c], ecx
add ecx, dword [esp + eax*4 + 0x24]
mov dword [esp + ebx*4 + 0x2c], ecx
add ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + ebx*4 + 0x2c], ecx
add ecx, dword [esp + eax*4 + 0x2c]
mov dword [esp + ebx*4 + 0x2c], ecx
add eax, 4
cmp eax, 0x24
jne 0x4089b0
test ebx, ebx
jle 0x408a12
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 + 0x28]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x4089f0
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x408c8d
jmp 0x408a22
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x408c8d
mov edi, dword [esp + 0x18]
shl edi, 5
mov ebp, ebx
mov ebx, dword [esp + 0x10]
lea eax, [ebx + edi]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.00408d90
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, ebx
add eax, 0x8852
mov ebx, ebp
push 0x240
push 0
push eax
call fcn.00408d90
add esp, 0xc
test ebp, ebp
jle 0x408b46
add dword [esp], 0xfffffffe
mov eax, 1
mov dword [esp + 0x18], edi
jmp 0x408a98
mov ebx, dword [esp + 4]
mov dword [esp + 4], ebx
inc eax
mov ebx, dword [esp + 0x15c8]
cmp eax, ebx
jg 0x408b46
mov ecx, dword [esp + eax*4 + 0x2c]
test ecx, ecx
jle 0x408a80
mov edx, ecx
and edx, 3
je 0x408af0
mov dword [esp + 8], ecx
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 4]
mov esi, dword [esp]
lea edi, [esi + ecx*4]
xor esi, esi
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov ecx, dword [esp + 0x18]
add ecx, ebp
mov byte [ebx + ecx + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x408ac0
sub dword [esp + 4], esi
mov ecx, dword [esp + 8]
mov edx, ecx
sub edx, esi
mov edi, dword [esp + 0x18]
jmp 0x408af2
mov edx, ecx
cmp ecx, 4
mov ebx, dword [esp + 4]
mov ebp, dword [esp]
jb 0x408a84
dec edx
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 0x408b00
jmp 0x408a84
mov esi, dword [esp + 0x15c4]
mov dword [esp + 0xb4], 0
cmp ebx, 2
jl 0x408bb6
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x408b73
xor eax, eax
mov edx, 2
test cl, 1
jne 0x408ba9
jmp 0x408bb6
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x30]
add eax, eax
mov dword [esp + edx*4 + 0xb8], eax
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0xbc], eax
add edx, 2
cmp ebx, edx
jne 0x408b80
add edx, 2
test cl, 1
je 0x408bb6
add eax, dword [esp + edx*4 + 0x28]
add eax, eax
mov dword [esp + edx*4 + 0xb0], eax
test esi, esi
mov ecx, dword [esp + 0x20]
jle 0x408c82
xor eax, eax
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
mov edi, dword [esp + 0x10]
add edx, edi
shl ecx, 6
add ecx, edi
mov dword [esp + 8], ecx
jmp 0x408bfc
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], bx
mov esi, dword [esp + 0x15c4]
inc eax
cmp eax, esi
je 0x408c82
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408bf3
mov ebp, dword [esp + ecx*4 + 0xb0]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0xb0], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x408c5f
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 0x408c30
test edi, edi
je 0x408be0
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 0x408c70
jmp 0x408be0
add esp, 0x15b0
pop esi
pop edi
pop ebx
pop ebp
ret
dec dword [esp + ebx*4 + 0x2c]
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x408cb8
mov esi, dword [esp + ecx*4 + 0x28]
dec ecx
test esi, esi
je 0x408ca0
dec esi
mov dword [esp + ecx*4 + 0x2c], esi
add dword [esp + ecx*4 + 0x30], 2
dec eax
cmp eax, edx
jne 0x408c8d
jmp 0x408a22