Function at 0x407bb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15ac
call fcn.00408560
mov esi, edx
mov edi, ecx
mov ebx, dword [esp + 0x15c0]
lea eax, [esp + 0x28]
push 0x84
push 0
push eax
call fcn.004086a0
add esp, 0xc
cmp dword [esp + 0x15c8], 0
mov dword [esp + 0x18], esi
je 0x407c5e
test ebx, ebx
jle 0x4083b0
xor eax, eax
cmp ebx, 1
je 0x407c38
mov ecx, ebx
and ecx, 0xfffffffe
mov eax, dword [esp + 0x18]
lea eax, [eax + eax*8]
shl eax, 5
lea edx, [eax + edi]
add edx, 0x8f13
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x28]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x28]
add eax, 2
cmp ecx, eax
jne 0x407c20
test bl, 1
je 0x4083b0
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, edi
movzx eax, byte [eax + ecx + 0x8f12]
inc dword [esp + eax*4 + 0x28]
jmp 0x4083b0
lea ebp, [esi + esi*8]
mov eax, ebp
shl eax, 6
test ebx, ebx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], eax
jle 0x407d5e
cmp ebx, 1
jne 0x407d80
mov ebx, edi
xor ebp, ebp
xor eax, eax
mov ecx, dword [esp + 0x15c0]
test cl, 1
je 0x407cb7
mov ecx, dword [esp + 0x20]
add ecx, ebx
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x407cb7
mov word [esp + ebp*4 + 0xac], cx
mov word [esp + ebp*4 + 0xae], ax
inc ebp
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.004086a0
add esp, 0xc
test ebp, ebp
sete byte [esp + 0xb]
je 0x407de5
mov ecx, ebp
xor eax, eax
cmp ebp, 1
je 0x407d2f
mov ecx, ebp
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xac]
movzx esi, dl
inc dword [esp + esi*4 + 0x52c]
shr edx, 8
inc dword [esp + edx*4 + 0x92c]
movzx edx, word [esp + eax*4 + 0xb0]
movzx esi, dl
inc dword [esp + esi*4 + 0x52c]
shr edx, 8
inc dword [esp + edx*4 + 0x92c]
add eax, 2
cmp ecx, eax
jne 0x407cf0
mov edx, ebp
test dl, 1
je 0x407d52
movzx eax, word [esp + eax*4 + 0xac]
movzx ecx, al
inc dword [esp + ecx*4 + 0x52c]
shr eax, 8
inc dword [esp + eax*4 + 0x92c]
mov eax, dword [esp + 0x92c]
jmp 0x407dee
lea eax, [esp + 0x52c]
push 0x800
push 0
push eax
call fcn.004086a0
add esp, 0xc
xor edx, edx
mov byte [esp + 0xb], 1
xor eax, eax
jmp 0x407df0
mov ecx, ebx
and ecx, 0xfffffffe
mov ebx, edi
lea edx, [eax + edi]
add edx, 0x8194
xor ebp, ebp
xor eax, eax
jmp 0x407dab
add eax, 2
cmp ecx, eax
je 0x407c85
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x407dc6
mov word [esp + ebp*4 + 0xac], si
mov word [esp + ebp*4 + 0xae], ax
inc ebp
movzx esi, word [edx + eax*2]
test si, si
je 0x407da0
mov word [esp + ebp*4 + 0xac], si
lea esi, [eax + 1]
mov word [esp + ebp*4 + 0xae], si
inc ebp
jmp 0x407da0
xor edx, edx
mov byte [esp + 0xb], 1
xor eax, eax
mov edi, ebx
mov dword [esp + 0x10], edi
xor ecx, ecx
mov dword [esp], edx
cmp eax, edx
sete cl
mov eax, 2
sub eax, ecx
mov dword [esp + 0x24], eax
lea ebx, [esp + 0x112c]
lea edx, [esp + 0xac]
xor ecx, ecx
xor eax, eax
mov esi, dword [esp]
jmp 0x407e36
mov eax, dword [esp + 0x1c]
inc eax
add ecx, 8
mov edx, dword [esp + 4]
cmp eax, dword [esp + 0x24]
je 0x407ed2
mov dword [esp + 4], ebx
mov ebx, edx
mov dword [esp + 0x1c], eax
mov edx, eax
shl edx, 0xa
lea ebp, [esp + edx]
add ebp, 0x52c
xor edx, edx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + edx*4 + 0xd2c], edi
add edi, dword [ebp + edx*4]
mov eax, edx
and eax, 1
xor edx, 1
lea edx, [edx + eax*2]
cmp edx, 0x100
jb 0x407e60
cmp byte [esp + 0xb], 0
jne 0x407e20
xor ebp, ebp
mov dword [esp + 0xc], ecx
nop
nop
nop
nop
nop
movzx eax, word [ebx + ebp*4]
mov ecx, dword [esp + 0xc]
shr eax, cl
movzx eax, al
mov edx, dword [esp + eax*4 + 0xd2c]
mov edi, dword [ebx + ebp*4]
mov ecx, ebx
mov ebx, dword [esp + 4]
mov dword [ebx + edx*4], edi
mov ebx, ecx
mov ecx, dword [esp + 0xc]
mov edi, edx
and edx, 1
xor edi, 1
lea edx, [edi + edx*2]
mov dword [esp + eax*4 + 0xd2c], edx
inc ebp
cmp esi, ebp
jne 0x407e90
jmp 0x407e20
cmp dword [esp], 0
mov ebx, dword [esp + 0x15c4]
je 0x408280
mov edx, dword [esp]
cmp edx, 1
jne 0x407ef9
mov eax, dword [esp + 4]
mov word [eax], 1
jmp 0x40816d
mov ebp, dword [esp + 4]
movzx eax, word [ebp + 4]
add word [ebp], ax
lea edi, [edx - 2]
cmp edx, 3
jl 0x407fbf
mov ecx, 2
mov eax, edx
mov ebx, 2
sub ebx, edx
xor esi, esi
mov ebp, 1
mov dword [esp + 0xc], edi
jmp 0x407f4f
mov edx, dword [esp + 4]
movzx edi, word [edx + esi*4]
add word [edx + ebp*4], di
mov word [edx + esi*4], bp
inc esi
mov edi, dword [esp + 0xc]
lea eax, [ebx + ebp]
inc eax
inc ebp
cmp eax, 1
je 0x407fcb
mov edx, dword [esp + 4]
movzx eax, word [edx + esi*4]
cmp ecx, dword [esp]
jge 0x407f65
movzx edi, word [edx + ecx*4]
cmp ax, di
jae 0x407f80
mov word [edx + ebp*4], ax
mov word [edx + esi*4], bp
inc esi
cmp ecx, dword [esp]
jge 0x407f30
jmp 0x407f8a
inc ecx
mov word [edx + ebp*4], di
cmp ecx, dword [esp]
jge 0x407f30
cmp esi, ebp
jge 0x407fb0
mov edx, dword [esp + 4]
movzx edi, word [edx + esi*4]
movzx eax, word [edx + ecx*4]
cmp di, ax
jb 0x407f38
jmp 0x407fb8
mov edx, dword [esp + 4]
movzx eax, word [edx + ecx*4]
inc ecx
add word [edx + ebp*4], ax
jmp 0x407f41
mov word [ebp + edx*4 - 8], 0
jmp 0x408055
mov eax, dword [esp]
mov ebp, dword [esp + 4]
mov word [ebp + eax*4 - 8], 0
lea edx, [eax - 3]
mov esi, edi
mov ecx, edx
and esi, 3
je 0x408004
mov ecx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, word [ebp + ecx*4]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + ecx*4], ax
dec ecx
dec esi
jne 0x407ff0
cmp edx, 3
mov edx, dword [esp]
jb 0x408055
inc ecx
nop
nop
nop
movzx eax, word [ebp + ecx*4 - 4]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + ecx*4 - 4], ax
movzx eax, word [ebp + ecx*4 - 8]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + ecx*4 - 8], ax
movzx eax, word [ebp + ecx*4 - 0xc]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + ecx*4 - 0xc], ax
movzx eax, word [ebp + ecx*4 - 0x10]
movzx eax, word [ebp + eax*4]
inc eax
mov word [ebp + ecx*4 - 0x10], ax
add ecx, 0xfffffffc
jne 0x408010
mov eax, edx
xor eax, 0xfffffffe
mov ecx, edx
and ecx, 0xfffffffe
lea ecx, [eax + ecx*2]
inc ecx
mov esi, 1
xor edx, edx
jmp 0x4080a1
mov ebp, dword [esp + 4]
mov ebx, eax
and ebx, 2
mov esi, eax
or eax, 2
imul eax, ebx
xor ebx, 2
and esi, 0x7ffffffd
imul esi, ebx
add eax, esi
inc edx
mov esi, eax
test eax, eax
mov ebx, dword [esp + 0x15c4]
jle 0x408163
test edi, edi
js 0x4080d0
lea eax, [edi + 1]
mov dword [esp + 0xc], eax
xor eax, eax
nop
nop
mov ebx, edi
movzx edi, word [ebp + edi*4]
cmp edx, edi
jne 0x4080e0
inc eax
add ebx, 0xffffffff
mov edi, ebx
jb 0x4080b0
mov edi, 0xffffffff
mov eax, dword [esp + 0xc]
jmp 0x4080e2
xor eax, eax
jmp 0x4080e2
mov edi, ebx
mov ebp, esi
sub ebp, eax
jle 0x408070
mov ebx, eax
not ebx
add ebx, esi
and ebp, 3
je 0x408129
mov dword [esp + 0x1c], ebx
mov ebx, eax
mov dword [esp + 0xc], edi
mov eax, dword [esp + 4]
lea edi, [eax + ecx*4]
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [edi], dx
inc eax
add edi, 0xfffffffc
cmp ebp, eax
jne 0x408110
sub ecx, eax
sub esi, eax
mov edi, dword [esp + 0xc]
mov eax, ebx
mov ebx, dword [esp + 0x1c]
cmp ebx, 3
mov ebp, dword [esp + 4]
jb 0x408074
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp + ecx*4], dx
mov word [ebp + ecx*4 - 4], dx
mov word [ebp + ecx*4 - 8], dx
mov word [ebp + ecx*4 - 0xc], dx
add ecx, 0xfffffffc
add esi, 0xfffffffc
cmp esi, eax
jg 0x408140
jmp 0x408074
cmp dword [esp], 0
jle 0x408280
mov eax, dword [esp]
lea edx, [eax - 1]
and eax, 3
xor ecx, ecx
cmp edx, 3
mov edi, dword [esp + 4]
jb 0x4081ba
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x28]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x28]
add ecx, 4
cmp edx, ecx
jne 0x408190
test eax, eax
je 0x4081dd
lea ecx, [edi + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x28]
inc edx
cmp eax, edx
jne 0x4081d0
cmp dword [esp], 2
jl 0x408280
cmp ebx, 0x20
jge 0x408250
mov eax, dword [esp + ebx*4 + 0x28]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x40820c
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
inc ecx
mov dword [esp + ebx*4 + 0x28], eax
dec edx
jne 0x408200
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x408248
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x2c]
mov dword [esp + ebx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + ebx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + ebx*4 + 0x28], eax
add eax, dword [esp + ecx*4 + 0x38]
add ecx, 4
mov dword [esp + ebx*4 + 0x28], eax
cmp ecx, 0x20
jne 0x408220
test ebx, ebx
jle 0x4084fd
lea edx, [ebx + 1]
xor ecx, ecx
xor eax, eax
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 0x408260
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x408508
mov ebp, dword [esp + 0x14]
shl ebp, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.004086a0
add esp, 0xc
mov eax, dword [esp + 0x20]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.004086a0
add esp, 0xc
test ebx, ebx
jle 0x4083a5
add dword [esp + 4], 0xfffffffe
mov eax, 1
mov dword [esp + 0x14], ebp
jmp 0x4082fa
mov ebx, dword [esp]
mov dword [esp], ebx
lea ecx, [eax + 1]
mov edx, dword [esp + 0x15c4]
cmp eax, edx
mov eax, ecx
je 0x4083a5
mov ebx, dword [esp + eax*4 + 0x28]
test ebx, ebx
jle 0x4082e0
mov edx, ebx
and edx, 3
je 0x408350
mov dword [esp + 0xc], ebx
mov ecx, dword [esp]
mov esi, dword [esp + 4]
lea ebp, [esi + ecx*4]
xor esi, esi
mov ebx, dword [esp + 0x10]
nop
nop
nop
movzx edi, word [ebp]
mov ecx, dword [esp + 0x14]
add ecx, ebx
mov byte [edi + ecx + 0x8f12], al
inc esi
add ebp, 0xfffffffc
cmp edx, esi
jne 0x408320
sub dword [esp], esi
mov ebx, dword [esp + 0xc]
mov edx, ebx
sub edx, esi
mov ebp, dword [esp + 0x14]
jmp 0x408352
mov edx, ebx
cmp ebx, 4
mov ebx, dword [esp]
mov edi, dword [esp + 4]
jb 0x4082e3
dec edx
nop
movzx ecx, word [edi + ebx*4]
mov esi, dword [esp + 0x10]
add esi, ebp
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 4]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 8]
mov byte [ecx + esi + 0x8f12], al
movzx ecx, word [edi + ebx*4 - 0xc]
mov byte [ecx + esi + 0x8f12], al
add ebx, 0xfffffffc
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x408360
jmp 0x4082e3
mov ebx, dword [esp + 0x15c0]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x530], 0
mov ecx, dword [esp + 0x15c4]
cmp ecx, 2
jl 0x40842c
lea eax, [ecx - 1]
cmp ecx, 2
jne 0x4083dc
mov edx, 2
xor ecx, ecx
test al, 1
jne 0x40841f
jmp 0x40842c
mov ebx, eax
and ebx, 0xfffffffe
xor ecx, ecx
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add ecx, dword [esp + edx*4 + 0x2c]
add ecx, ecx
mov dword [esp + edx*4 + 0x534], ecx
add ecx, dword [esp + edx*4 + 0x30]
add ecx, ecx
mov dword [esp + edx*4 + 0x538], ecx
add edx, 2
cmp ebx, edx
jne 0x4083f0
add edx, 2
mov ebx, dword [esp + 0x15c0]
test al, 1
je 0x40842c
add ecx, dword [esp + edx*4 + 0x24]
add ecx, ecx
mov dword [esp + edx*4 + 0x52c], ecx
test ebx, ebx
jle 0x4084f2
xor eax, eax
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*8]
mov edx, ecx
shl edx, 5
add edx, edi
shl ecx, 6
add ecx, edi
mov dword [esp + 0xc], ecx
jmp 0x40846c
mov ecx, dword [esp + 0xc]
mov word [ecx + eax*2 + 0x8852], bx
mov ebx, dword [esp + 0x15c0]
inc eax
cmp eax, ebx
je 0x4084f2
movzx ecx, byte [eax + edx + 0x8f12]
test ecx, ecx
je 0x408463
mov ebp, dword [esp + ecx*4 + 0x52c]
lea edi, [ebp + 1]
mov dword [esp + ecx*4 + 0x52c], edi
mov edi, ecx
and edi, 3
xor ebx, ebx
cmp cl, 4
jb 0x4084cf
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 0x4084a0
test edi, edi
je 0x408450
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 0x4084e0
jmp 0x408450
add esp, 0x15ac
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
lea ecx, [ebx + ebx]
jmp 0x408519
dec eax
cmp eax, edx
je 0x408280
dec dword [esp + ebx*4 + 0x28]
mov esi, ecx
mov ebp, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
dec ebp
test ebp, ebp
jle 0x408510
mov edi, dword [esp + esi*2 + 0x24]
add esi, 0xfffffffe
test edi, edi
je 0x408530
dec edi
mov dword [esp + esi*2 + 0x28], edi
and esi, 2
xor ebp, 1
add ebp, esi
add dword [esp + ebp*4 + 0x28], 2
jmp 0x408510