Function at 0x676530
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xa0
mov ecx, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x18]
mov eax, esi
neg eax
and eax, 3
add esi, eax
xor edx, edx
sub ecx, eax
cmovb ecx, edx
cmovb esi, edx
mov dword [esp], esi
mov eax, 0xffffffbe
cmp ecx, 0x1300
jb 0x676fba
mov edi, dword [ebp + 0x10]
mov eax, 0xffffffd2
cmp edi, 0xff
ja 0x676fba
mov esi, dword [ebp + 0xc]
push 0x1300
push 0
push dword [esp + 8]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
lea ecx, [edi + 1]
test edi, edi
mov dword [esp + 0x20], ecx
je 0x6765fa
and ecx, 0xfffffffe
xor eax, eax
mov ebx, dword [esp]
nop dword [eax]
mov edx, dword [esi + eax*4]
bsr edi, edx
xor edi, 0xffffffe0
add edi, 0xbe
cmp edx, 0xa5
cmovb edi, edx
inc word [ebx + edi*4 + 0x1000]
mov edx, dword [esi + eax*4 + 4]
bsr edi, edx
xor edi, 0xffffffe0
add edi, 0xbe
cmp edx, 0xa5
cmovb edi, edx
inc word [ebx + edi*4 + 0x1000]
add eax, 2
cmp ecx, eax
jne 0x6765b0
jmp 0x6765ff
xor eax, eax
mov ebx, dword [esp]
test byte [esp + 0x20], 1
mov edx, ebx
je 0x676627
mov eax, dword [esi + eax*4]
bsr ecx, eax
xor ecx, 0xffffffe0
add ecx, 0xbe
cmp eax, 0xa5
cmovb ecx, eax
inc word [edx + ecx*4 + 0x1000]
lea esi, [edx + 8]
movzx eax, word [edx + 0x12fc]
mov ecx, 0x4bd
nop word cs:[eax + eax]
add ax, word [edx + ecx*4 + 4]
mov word [edx + ecx*4 + 4], ax
mov word [edx + ecx*4 + 6], ax
cmp ecx, 0x3ff
je 0x676669
add ax, word [edx + ecx*4]
mov word [edx + ecx*4], ax
mov word [edx + ecx*4 + 2], ax
add ecx, 0xfffffffe
jmp 0x676640
mov dword [esp + 8], esi
xor eax, eax
nop
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx + eax*4]
bsr edx, ecx
xor edx, 0xffffffe0
add edx, 0xbe
cmp ecx, 0xa5
cmovb edx, ecx
mov esi, dword [esp]
movzx edi, word [esi + edx*4 + 0x1006]
lea ebx, [edi + 1]
mov esi, dword [esp]
mov word [esi + edx*4 + 0x1006], bx
mov edx, dword [esp]
mov dword [edx + edi*8 + 8], ecx
mov ecx, dword [esp]
mov byte [ecx + edi*8 + 0xe], al
mov edi, dword [esp]
inc eax
cmp dword [esp + 0x20], eax
jne 0x676670
mov esi, 0x4a5
mov ebx, dword [ebp + 0x10]
jmp 0x6766d9
inc esi
cmp esi, 0x4bf
je 0x6766fe
movzx eax, word [edi + esi*4 + 2]
movzx ecx, word [edi + esi*4]
sub eax, ecx
cmp eax, 2
jb 0x6766d0
mov edx, dword [esp + 8]
lea ecx, [edx + ecx*8]
dec eax
xor edx, edx
push eax
call fcn.00678380
add esp, 4
jmp 0x6766d0
lea eax, [ebx + 0xff]
mov dword [esp + 0x10], eax
lea eax, [edi + ebx*8]
add eax, 0x17
mov dword [esp + 4], eax
lea eax, [edi + ebx*8]
add eax, 0x7ff
mov dword [esp + 0x14], eax
lea esi, [ebx + 0xfe]
mov edi, dword [esp + 0x20]
nop dword [eax + eax]
mov ecx, edi
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x30], eax
mov eax, esi
mov esi, dword [esp + 8]
mov esi, dword [esi + ebx*8]
mov dword [esp + 0x1c], ebx
dec ebx
mov dword [esp + 0x24], edi
lea edi, [edi - 1]
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], ecx
lea edi, [ecx - 1]
mov dword [esp + 0x3c], edx
lea ecx, [edx - 8]
mov edx, dword [esp + 0x30]
mov dword [esp + 4], ecx
lea ecx, [edx - 8]
mov dword [esp + 0x14], ecx
lea ecx, [eax - 1]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], esi
test esi, esi
mov esi, dword [esp + 0x2c]
je 0x676730
mov dword [esp + 0x34], eax
mov edx, dword [ebp + 0x14]
test edx, edx
mov eax, 0xb
cmovne eax, edx
mov dword [esp + 0xc], eax
mov edi, dword [esp]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
add eax, dword [edi + ecx*8]
mov dword [edi + 0x808], eax
mov word [edi + ecx*8 + 4], 0x100
mov word [edi + ecx*8 + 0xc], 0x100
cmp ecx, 2
mov esi, ecx
jge 0x6767e0
mov dword [edi], 0x80000000
mov byte [edi + esi*8 + 0x807], 0
mov ebx, dword [esp + 8]
jmp 0x676a6b
mov ebx, dword [esp + 0x24]
cmp ebx, 0x102
mov edx, 0x101
mov ecx, 0x101
cmovge ecx, ebx
lea eax, [ecx - 0x101]
cmp eax, 7
jb 0x676885
cmp ebx, 0x102
mov eax, 0x101
cmovge eax, ebx
and eax, 0x7ffffff8
add eax, 0xffffff00
xor edx, edx
mov dword [edi + edx*8 + 0x810], 0x40000000
mov dword [edi + edx*8 + 0x818], 0x40000000
mov dword [edi + edx*8 + 0x820], 0x40000000
mov dword [edi + edx*8 + 0x828], 0x40000000
mov dword [edi + edx*8 + 0x830], 0x40000000
mov dword [edi + edx*8 + 0x838], 0x40000000
mov dword [edi + edx*8 + 0x840], 0x40000000
mov dword [edi + edx*8 + 0x848], 0x40000000
add edx, 8
cmp eax, edx
jne 0x676820
add edx, 0x101
test cl, 7
je 0x6768bc
lea eax, [edi + edx*8]
add eax, 8
cmp ebx, 0x102
mov ecx, 0x101
cmovge ecx, ebx
and ecx, 7
xor edx, edx
nop word cs:[eax + eax]
mov dword [eax + edx*8], 0x40000000
inc edx
cmp ecx, edx
jne 0x6768b0
add esi, 0xfffffffe
cmp ebx, 0x102
mov eax, 0x101
cmovge eax, ebx
mov dword [edi], 0x80000000
add eax, 0xffffff00
mov dword [esp + 0x38], eax
mov ebx, 0x100
xor ecx, ecx
jmp 0x676922
mov edx, dword [edi + eax*8 + 8]
mov esi, dword [esp + 0x14]
add edx, dword [edi + esi*8 + 8]
mov ecx, dword [esp + 0x2c]
mov dword [edi + ecx*8 + 0x810], edx
lea edx, [ecx + 0x101]
mov word [edi + eax*8 + 0xc], dx
mov word [edi + esi*8 + 0xc], dx
inc ecx
cmp dword [esp + 0x38], ecx
mov esi, dword [esp + 0x28]
je 0x67697e
mov dword [esp + 0x2c], ecx
mov eax, dword [edi + esi*8 + 8]
mov ecx, dword [edi + ebx*8 + 8]
cmp eax, ecx
mov edx, ebx
sbb edx, 0xffffffff
mov dword [esp + 0x14], esi
cmp eax, ecx
setb al
jb 0x676944
mov dword [esp + 0x14], ebx
xor ecx, ecx
mov cl, al
mov eax, esi
sub eax, ecx
mov ebx, esi
mov esi, dword [edi + eax*8 + 8]
mov dword [esp + 4], esi
mov esi, dword [edi + edx*8 + 8]
cmp dword [esp + 4], esi
sbb ebx, ecx
mov dword [esp + 0x28], ebx
mov ecx, dword [esp + 4]
cmp ecx, esi
mov ebx, edx
sbb ebx, 0xffffffff
cmp ecx, esi
jb 0x6768f0
mov eax, edx
jmp 0x6768f0
mov ebx, dword [esp + 8]
mov esi, dword [esp + 0x1c]
mov byte [ebx + esi*8 + 0x7ff], 0
cmp esi, 2
jl 0x676a6b
lea ecx, [esi + 0xfe]
cmp ecx, 0x100
mov eax, 0x100
cmovb eax, ecx
mov edx, dword [esp + 0x24]
sub edx, eax
mov esi, ecx
sub esi, eax
mov eax, 0x100
test dl, 3
je 0x676a11
mov dword [esp + 4], esi
mov ecx, dword [esp + 0x34]
cmp ecx, 0x100
cmovb eax, ecx
mov ecx, dword [esp + 0x24]
sub cl, al
movzx eax, cl
and eax, 3
xor ecx, ecx
mov esi, dword [esp + 0x30]
nop word cs:[eax + eax]
movzx edx, word [esi - 3]
movzx edx, byte [ebx + edx*8 + 7]
inc dl
mov byte [esi], dl
inc ecx
add esi, 0xfffffff8
cmp eax, ecx
jne 0x6769f0
mov eax, dword [esp + 0x10]
sub eax, ecx
mov ecx, eax
mov esi, dword [esp + 4]
cmp esi, 3
mov edi, dword [esp]
mov esi, dword [esp + 0x1c]
jb 0x676a6b
inc ecx
nop
movzx eax, word [edi + ecx*8 + 4]
movzx eax, byte [edi + eax*8 + 0xf]
inc al
mov byte [edi + ecx*8 + 7], al
movzx eax, word [edi + ecx*8 - 4]
movzx eax, byte [edi + eax*8 + 0xf]
inc al
mov byte [edi + ecx*8 - 1], al
movzx eax, word [edi + ecx*8 - 0xc]
movzx eax, byte [edi + eax*8 + 0xf]
inc al
mov byte [edi + ecx*8 - 9], al
movzx eax, word [edi + ecx*8 - 0x14]
movzx eax, byte [edi + eax*8 + 0xf]
inc al
mov byte [edi + ecx*8 - 0x11], al
add ecx, 0xfffffffc
cmp ecx, 0x100
ja 0x676a20
mov edi, esi
test esi, esi
js 0x676b1c
xor ecx, ecx
cmp edi, 3
mov ebx, dword [esp + 0x18]
mov esi, dword [esp]
jb 0x676ad7
mov edx, ebx
and edx, 0xfffffffc
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [esi + ecx*8 + 0xc]
movzx eax, byte [esi + eax*8 + 0xf]
inc al
mov byte [esi + ecx*8 + 0xf], al
movzx eax, word [esi + ecx*8 + 0x14]
movzx eax, byte [esi + eax*8 + 0xf]
inc al
mov byte [esi + ecx*8 + 0x17], al
movzx eax, word [esi + ecx*8 + 0x1c]
movzx eax, byte [esi + eax*8 + 0xf]
inc al
mov byte [esi + ecx*8 + 0x1f], al
movzx eax, word [esi + ecx*8 + 0x24]
movzx eax, byte [esi + eax*8 + 0xf]
inc al
mov byte [esi + ecx*8 + 0x27], al
add ecx, 4
cmp edx, ecx
jne 0x676a90
test bl, 3
mov ebx, dword [esp + 8]
je 0x676b1c
mov eax, dword [esp]
lea eax, [eax + ecx*8]
add eax, 0xf
mov ecx, dword [esp + 0x18]
and ecx, 3
xor edx, edx
nop word cs:[eax + eax]
movzx esi, word [eax + edx*8 - 3]
mov ebx, dword [esp + 8]
movzx ebx, byte [ebx + esi*8 + 7]
inc bl
mov byte [eax + edx*8], bl
mov ebx, dword [esp + 8]
inc edx
cmp ecx, edx
jne 0x676b00
movzx eax, byte [ebx + edi*8 + 7]
mov edx, dword [esp + 0xc]
mov dword [esp + 0x10], eax
cmp edx, eax
jae 0x676c01
mov eax, dword [esp + 0x10]
mov ecx, eax
sub ecx, edx
mov esi, 1
mov dword [esp + 0x14], ecx
shl esi, cl
mov dword [esp + 4], esi
xor edi, edi
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x3c]
nop word cs:[eax + eax]
mov ecx, dword [esp + 0x10]
sub ecx, eax
mov eax, 0xffffffff
shl eax, cl
mov ecx, ebx
add eax, dword [esp + 4]
add edi, eax
mov byte [ebx - 8], dl
movzx eax, byte [ebx - 0x10]
add ebx, 0xfffffff8
dec esi
cmp edx, eax
jb 0x676b60
nop word cs:[eax + eax]
movzx eax, byte [ebx - 8]
add ebx, 0xfffffff8
dec esi
cmp edx, eax
je 0x676b90
mov ecx, dword [esp + 0x14]
sar edi, cl
movaps xmm0, xmmword [0x8d7670]
movaps xmmword [esp + 0x60], xmm0
movaps xmmword [esp + 0x50], xmm0
movaps xmmword [esp + 0x40], xmm0
mov dword [esp + 0x74], 0xf0f0f0f0
mov dword [esp + 0x70], 0xf0f0f0f0
mov dword [esp + 4], esi
test esi, esi
mov esi, dword [esp]
js 0x676c07
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
jmp 0x676bec
lea edx, [eax - 1]
add ebx, 0xfffffff8
test eax, eax
mov eax, edx
jle 0x676c07
movzx edx, byte [ebx]
cmp ecx, edx
jbe 0x676be0
mov ecx, dword [esp + 0xc]
sub ecx, edx
mov dword [esp + ecx*4 + 0x40], eax
mov ecx, edx
jmp 0x676be0
mov edx, dword [esp + 0x10]
jmp 0x676c23
mov ecx, edi
test edi, edi
jg 0x676d27
mov edi, ecx
test edi, edi
js 0x676de4
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x1c]
mov eax, 0xffffffff
cmp edx, 0xc
ja 0x676fba
mov dword [esp + 0xc], edx
xorps xmm0, xmm0
movups xmmword [esp + 0x4a], xmm0
movaps xmmword [esp + 0x40], xmm0
movups xmmword [esp + 0x8a], xmm0
movaps xmmword [esp + 0x80], xmm0
test edi, edi
js 0x676cce
xor eax, eax
cmp edi, 3
mov esi, dword [esp]
jb 0x676c9f
mov ecx, dword [esp + 0x18]
and ecx, 0xfffffffc
xor eax, eax
nop dword [eax]
movzx edx, byte [esi + eax*8 + 0xf]
inc word [esp + edx*2 + 0x40]
movzx edx, byte [esi + eax*8 + 0x17]
inc word [esp + edx*2 + 0x40]
movzx edx, byte [esi + eax*8 + 0x1f]
inc word [esp + edx*2 + 0x40]
movzx edx, byte [esi + eax*8 + 0x27]
inc word [esp + edx*2 + 0x40]
add eax, 4
cmp ecx, eax
jne 0x676c70
mov ebx, dword [esp + 0x18]
test bl, 3
je 0x676cce
mov ecx, dword [esp]
lea eax, [ecx + eax*8]
add eax, 0xf
and ebx, 3
xor ecx, ecx
nop word cs:[eax + eax]
movzx edx, byte [eax + ecx*8]
inc word [esp + edx*2 + 0x40]
inc ecx
cmp ebx, ecx
jne 0x676cc0
cmp dword [esp + 0xc], 0
mov ebx, dword [ebp + 0x10]
jle 0x676ed2
mov edx, dword [esp + 0xc]
mov eax, edx
and eax, 3
cmp edx, 4
jae 0x676e54
xor ecx, ecx
jmp 0x676ea7
mov esi, dword [esp]
movzx eax, byte [esi + ebx*8 + 7]
dec ebx
mov ecx, dword [esp + 0xc]
sub ecx, edx
cmp ecx, eax
mov eax, 0xf0f0f0f0
cmovne ebx, eax
mov dword [esp + edx*4 + 0x40], ebx
mov ecx, edi
test edi, edi
jle 0x676c13
bsr eax, ecx
xor eax, 0x1f
mov edx, 1
cmp eax, 0x1f
mov dword [esp + 0x10], ecx
je 0x676d90
mov ecx, 0x20
sub ecx, eax
mov esi, dword [esp + ecx*4 + 0x40]
mov ecx, 0x1f
sub ecx, eax
jmp 0x676d5c
lea edi, [ecx - 1]
mov esi, eax
cmp ecx, 1
mov ecx, edi
jbe 0x676d90
mov eax, dword [esp + ecx*4 + 0x40]
cmp esi, 0xf0f0f0f0
je 0x676d50
cmp eax, 0xf0f0f0f0
je 0x676d7d
mov ebx, dword [esp + 8]
mov edi, dword [ebx + eax*8]
add edi, edi
cmp dword [ebx + esi*8], edi
ja 0x676d50
lea edx, [ecx + 1]
cmp edx, 0xc
ja 0x676dac
nop word cs:[eax + eax]
cmp dword [esp + edx*4 + 0x40], 0xf0f0f0f0
jne 0x676da5
inc edx
cmp edx, 0xd
jne 0x676d90
mov edx, 0xd
lea ecx, [edx - 1]
mov eax, dword [esp + edx*4 + 0x3c]
mov edi, 0xffffffff
shl edi, cl
add edi, dword [esp + 0x10]
mov ebx, dword [esp + edx*4 + 0x40]
mov esi, dword [esp + 8]
inc byte [esi + ebx*8 + 7]
cmp eax, 0xf0f0f0f0
cmove eax, ebx
mov dword [esp + ecx*4 + 0x40], eax
test ebx, ebx
jne 0x676d00
mov ebx, 0xf0f0f0f0
mov esi, dword [esp]
jmp 0x676d19
mov eax, dword [esp + 0x44]
test edi, edi
mov edx, 0xffffffff
cmovns edx, edi
inc edx
mov ecx, edi
nop word cs:[eax + eax]
cmp eax, 0xf0f0f0f0
je 0x676e16
dec byte [esi + eax*8 + 0x17]
inc eax
inc ecx
cmp edx, ecx
jne 0x676e00
jmp 0x676c1b
mov eax, dword [esp + 4]
add eax, 2
mov ebx, esi
mov esi, dword [esp + 0xc]
nop word cs:[eax + eax]
movzx edx, byte [ebx + eax*8 - 1]
dec eax
cmp esi, edx
je 0x676e30
dec byte [ebx + eax*8 + 0xf]
lea edi, [ecx + 1]
lea edx, [eax - 1]
mov dword [esp + 4], edx
cmp ecx, 0xfffffffe
mov esi, ebx
jle 0x676de8
jmp 0x676c1b
mov esi, edx
and esi, 0xfffffffc
xor ecx, ecx
nop dword [eax + eax]
mov word [esp + edx*2 + 0x80], cx
add cx, word [esp + edx*2 + 0x40]
movzx ecx, cx
shr ecx, 1
mov word [esp + edx*2 + 0x7e], cx
add cx, word [esp + edx*2 + 0x3e]
movzx ecx, cx
shr ecx, 1
mov word [esp + edx*2 + 0x7c], cx
add cx, word [esp + edx*2 + 0x3c]
movzx ecx, cx
shr ecx, 1
mov word [esp + edx*2 + 0x7a], cx
add cx, word [esp + edx*2 + 0x3a]
movzx ecx, cx
shr ecx, 1
add edx, 0xfffffffc
add esi, 0xfffffffc
jne 0x676e60
test eax, eax
je 0x676ed2
lea esi, [esp + edx*2]
add esi, 0x40
lea edx, [esp + edx*2]
add edx, 0x80
neg eax
xor edi, edi
nop
mov word [edx + edi*2], cx
add cx, word [esi + edi*2]
movzx ecx, cx
shr ecx, 1
dec edi
cmp eax, edi
jne 0x676ec0
cmp ebx, 0x7ffffffe
mov edi, dword [ebp + 8]
ja 0x676fb4
mov eax, dword [esp + 0x20]
mov edx, ebx
mov ebx, edi
mov ecx, eax
and ecx, 3
mov dword [esp + 8], ecx
xor ecx, ecx
cmp edx, 3
mov edi, dword [esp]
jb 0x676f4f
and eax, 0xfffffffc
xor ecx, ecx
nop word cs:[eax + eax]
movzx edx, byte [edi + ecx*8 + 0xe]
movzx esi, byte [edi + ecx*8 + 0xf]
mov dword [ebx + edx*4 + 4], esi
movzx edx, byte [edi + ecx*8 + 0x16]
movzx esi, byte [edi + ecx*8 + 0x17]
mov dword [ebx + edx*4 + 4], esi
movzx edx, byte [edi + ecx*8 + 0x1e]
movzx esi, byte [edi + ecx*8 + 0x1f]
mov dword [ebx + edx*4 + 4], esi
movzx edx, byte [edi + ecx*8 + 0x26]
movzx esi, byte [edi + ecx*8 + 0x27]
mov dword [ebx + edx*4 + 4], esi
add ecx, 4
cmp eax, ecx
jne 0x676f10
mov eax, dword [esp + 8]
test eax, eax
je 0x676f72
lea ecx, [edi + ecx*8]
add ecx, 0xf
xor edx, edx
nop
movzx esi, byte [ecx + edx*8 - 1]
movzx edi, byte [ecx + edx*8]
mov dword [ebx + esi*4 + 4], edi
inc edx
cmp eax, edx
jne 0x676f60
mov eax, dword [ebp + 0x10]
inc eax
mov dword [esp], eax
xor eax, eax
mov edi, ebx
jmp 0x676f86
inc eax
cmp dword [esp], eax
je 0x676fb4
mov edx, dword [edi + eax*4 + 4]
movzx ecx, dl
movzx esi, word [esp + ecx*2 + 0x80]
mov ebx, edi
lea edi, [esi + 1]
mov word [esp + ecx*2 + 0x80], di
mov edi, ebx
test ecx, ecx
je 0x676f80
neg cl
shl esi, cl
or esi, edx
mov dword [edi + eax*4 + 4], esi
jmp 0x676f80
mov eax, dword [esp + 0xc]
mov dword [edi], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret