Function at 0x100165cf
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10081ab0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x1e8
mov eax, dword [0x103e6644]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x4c], esi
addss xmm2, dword [esi + 0x44]
mov dl, byte [ebx + 0x10]
movsd xmm3, qword [0x101b8080]
movsd xmm1, qword [0x1037d6f8]
comiss xmm2, dword [0x103827c4]
jb 0x1001663b
movaps xmm0, xmm1
jmp 0x1001663e
movaps xmm0, xmm3
cvtpd2ps xmm0, xmm0
xorps xmm5, xmm5
addss xmm0, xmm2
movsd qword [ebp - 0xb0], xmm5
cvttss2si eax, xmm0
mov dword [ebp - 0xbc], eax
movd xmm0, eax
mov eax, dword [ebx + 0xc]
cvtdq2ps xmm0, xmm0
subss xmm2, xmm0
movss dword [esi + 0x44], xmm2
movsd xmm4, qword [eax]
addsd xmm4, qword [esi + 0x48]
comisd xmm4, xmm5
movsd qword [esi + 0x48], xmm4
movsd xmm2, qword [eax + 8]
addsd xmm2, qword [esi + 0x50]
movsd qword [esi + 0x50], xmm2
jb 0x10016696
movaps xmm0, xmm1
jmp 0x10016699
movaps xmm0, xmm3
comisd xmm2, xmm5
addsd xmm0, xmm4
cvttsd2si eax, xmm0
mov dword [ebp - 0x60], eax
jae 0x100166ad
movaps xmm1, xmm3
addsd xmm1, xmm2
movd xmm3, eax
cvtdq2pd xmm3, xmm3
or eax, 0xffffffff
cmp byte [esi + 0x41], 0
movaps xmm0, xmm4
cvttsd2si edi, xmm1
subsd xmm0, xmm3
mov dword [ebp - 0x5c], edi
movd xmm1, edi
cvtdq2pd xmm1, xmm1
movsd qword [esi + 0x48], xmm0
movaps xmm0, xmm2
subsd xmm0, xmm1
movsd qword [esi + 0x50], xmm0
xorps xmm0, xmm0
movups xmmword [ebp - 0x24], xmm0
je 0x100166ff
mov ecx, 1
mov word [ebp - 0x1a], ax
mov word [ebp - 0x1e], cx
jmp 0x1001670c
mov eax, 1
mov word [ebp - 0x22], ax
mov word [ebp - 0x16], ax
mov eax, dword [esi + 8]
lea esi, [ebp - 0x24]
push esi
push 0
movzx ecx, dl
lea esi, [ebp - 0x38]
movzx edx, word [ebx + 8]
push 0
shl ecx, 7
push esi
or ecx, 2
push ecx
push edx
push dword [eax]
mov dword [ebp - 0x54], ecx
call dword [sym.imp.GDI32.dll_GetGlyphOutlineW]
mov edx, eax
mov dword [ebp - 0x40], edx
cmp edx, 0xffffffff
je 0x10016f42
xor esi, esi
mov dword [ebp - 0x58], esi
test edx, edx
je 0x10016761
mov ecx, dword [0x103e65e0]
push edx
mov eax, dword [ecx]
mov eax, dword [eax]
call eax
mov edx, dword [ebp - 0x40]
mov esi, eax
mov dword [ebp - 0x58], esi
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx + 8]
lea ecx, [ebp - 0x24]
push ecx
push esi
push edx
lea ecx, [ebp - 0x38]
push ecx
push dword [ebp - 0x54]
movzx ecx, word [ebx + 8]
push ecx
push dword [eax]
call dword [sym.imp.GDI32.dll_GetGlyphOutlineW]
mov dword [ebp - 0x54], eax
cmp eax, dword [ebp - 0x40]
jne 0x10016f4c
mov ecx, dword [0x103e65e0]
push 0x28
mov eax, dword [ecx]
mov eax, dword [eax]
call eax
mov ecx, eax
lea eax, [ecx + 4]
mov dword [ebp - 0x50], ecx
mov dword [eax], 0
mov dword [ebp - 0x98], ecx
mov dword [ecx], fcn.1007600f
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov dword [ecx + 0x10], 0x80000000
mov dword [ecx + 0x14], 0
mov dword [ecx + 0x18], 0
mov dword [ecx + 0x1c], 0x80000000
mov dword [ecx + 0x20], 0
mov byte [ecx + 0x24], 0
lock inc dword [eax]
xorps xmm0, xmm0
mov word [ebp - 0x94], 0
xor dl, dl
movups xmmword [ebp - 0x90], xmm0
mov ecx, dword [ebp - 0x54]
mov eax, esi
add ecx, esi
mov byte [ebp - 4], 1
movsd xmm5, qword [0x1037d6b0]
cmp esi, ecx
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x40], eax
movsd qword [ebp - 0x80], xmm5
jae 0x10016b09
movsd xmm2, qword [0x101b8088]
movsd qword [ebp - 0xa0], xmm2
cmp dword [eax + 4], 0x18
jne 0x10016fbe
cmp dword [eax], 0x1c
mov edi, dword [ebp - 0x5c]
jb 0x10016fbe
mov esi, dword [eax]
add esi, eax
mov dword [ebp - 0x48], esi
cmp eax, esi
jae 0x10016fb4
mov esi, dword [ebp - 0x54]
cmp dword [ebp - 0x48], esi
mov esi, dword [ebp - 0x58]
ja 0x10016fb4
movd xmm1, dword [eax + 0xc]
movd xmm0, dword [eax + 8]
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm2
mulsd xmm0, xmm2
xorps xmm1, xmm5
movsd qword [ebp - 0x128], xmm1
movsd qword [ebp - 0x130], xmm0
test dl, dl
jne 0x10016f56
lea eax, [ebp - 0x130]
push eax
call fcn.10021c8c
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
add eax, 0x10
mov byte [ebp - 0x94], 1
mov dword [ebp - 0x40], eax
cmp eax, ecx
jae 0x10016abc
movzx edx, word [eax + 2]
lea ecx, [eax + 4]
mov dword [ebp - 0x3c], ecx
lea edi, [ecx + edx*8]
mov dword [ebp - 0x40], edi
cmp ecx, edi
mov edi, dword [ebp - 0x5c]
ja 0x10016fa0
mov esi, dword [ebp - 0x48]
cmp dword [ebp - 0x40], esi
mov esi, dword [ebp - 0x58]
ja 0x10016fa0
test edx, edx
je 0x10016aa9
movzx eax, word [eax]
sub eax, 1
je 0x10016a13
sub eax, 1
jne 0x10016f8b
dec edx
mov dword [ebp - 0x40], edx
test edx, edx
jle 0x10016998
mov edi, ecx
mov esi, edx
nop word [eax + eax]
mov eax, edi
lea ecx, [ebp - 0x98]
add edi, 8
movd xmm1, dword [eax + 4]
movd xmm0, dword [eax]
lea eax, [ebp - 0x140]
cvtdq2pd xmm1, xmm1
push eax
cvtdq2pd xmm0, xmm0
mulsd xmm1, qword [ebp - 0xa0]
mulsd xmm0, qword [ebp - 0xa0]
xorps xmm1, xmmword [ebp - 0x80]
movsd qword [ebp - 0x138], xmm1
movsd qword [ebp - 0x140], xmm0
call fcn.100130f1
dec esi
test esi, esi
jg 0x10016930
mov edx, dword [ebp - 0x98]
mov esi, dword [ebp - 0x58]
mov dword [ebp - 0x3c], edi
mov edi, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x50], edx
jmp 0x1001699b
mov edx, dword [ebp - 0x50]
mov eax, ecx
add ecx, 8
cmp byte [ebp - 0x94], 0
mov dword [ebp - 0x3c], ecx
movd xmm1, dword [eax + 4]
movd xmm0, dword [eax]
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
mulsd xmm1, qword [ebp - 0xa0]
mulsd xmm0, qword [ebp - 0xa0]
xorps xmm1, xmmword [ebp - 0x80]
movsd qword [ebp - 0x148], xmm1
movsd qword [ebp - 0x150], xmm0
je 0x10016f60
cmp byte [ebp - 0x93], 0
je 0x10016f60
lea eax, [ebp - 0x150]
mov ecx, edx
push eax
lea eax, [ebp - 0x90]
push eax
call fcn.1001316a
mov byte [ebp - 0x93], 0
jmp 0x10016aa6
sub edx, 1
mov dword [ebp - 0x40], edx
js 0x10016aa9
mov edi, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x50]
nop word [eax + eax]
mov eax, edi
add edi, 8
cmp byte [ebp - 0x94], 0
movd xmm1, dword [eax + 4]
movd xmm0, dword [eax]
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
mulsd xmm1, qword [ebp - 0xa0]
mulsd xmm0, qword [ebp - 0xa0]
xorps xmm1, xmmword [ebp - 0x80]
movsd qword [ebp - 0x158], xmm1
movsd qword [ebp - 0x160], xmm0
je 0x10016f6f
cmp byte [ebp - 0x93], 0
jne 0x10016f6f
lea eax, [ebp - 0x160]
mov ecx, esi
push eax
call fcn.10021f75
mov edx, dword [ebp - 0x40]
sub edx, 1
mov dword [ebp - 0x40], edx
jns 0x10016a30
mov esi, dword [ebp - 0x58]
mov dword [ebp - 0x3c], edi
mov edi, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x3c]
mov eax, ecx
mov dword [ebp - 0x40], eax
cmp ecx, dword [ebp - 0x48]
jb 0x100168d2
mov ecx, dword [ebp - 0x48]
cmp eax, ecx
jne 0x10016faa
cmp byte [ebp - 0x94], 0
je 0x10016f79
cmp byte [ebp - 0x93], 0
jne 0x10016f79
mov ecx, dword [ebp - 0x50]
call fcn.100216c5
mov eax, dword [ebp - 0x40]
xor dl, dl
movsd xmm5, qword [ebp - 0x80]
mov byte [ebp - 0x94], dl
cmp eax, dword [ebp - 0x54]
jae 0x10016b09
movsd xmm2, qword [ebp - 0xa0]
mov ecx, dword [ebp - 0x50]
jmp 0x10016842
mov ecx, dword [ebp - 0x4c]
movd xmm1, dword [ebp - 0x60]
cvtdq2pd xmm1, xmm1
cmp byte [ecx + 0x42], 0
movups xmm0, xmmword [ecx + 0x20]
movsd xmm4, qword [ecx + 0x18]
movups xmmword [ebp - 0xa8], xmm0
movd xmm0, dword [ebp - 0xbc]
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm4
addsd xmm0, qword [ecx + 0x20]
movsd qword [ecx + 0x20], xmm0
movaps xmm0, xmm4
mulsd xmm0, xmm1
je 0x10016b5a
movsd xmm3, qword [ebp - 0xa8]
subsd xmm3, xmm0
jmp 0x10016b65
movaps xmm3, xmm0
addsd xmm3, qword [ebp - 0xa8]
cmp byte [ecx + 0x40], 0
movsd xmm6, qword [ebp - 0xb0]
movsd xmm2, qword [ecx + 0x38]
addsd xmm3, xmm6
movd xmm1, edi
movaps xmm0, xmm2
cvtdq2pd xmm1, xmm1
mulsd xmm2, xmm6
addsd xmm0, xmm6
mulsd xmm4, xmm1
movsd xmm1, qword [ebp - 0xa0]
addsd xmm2, xmm6
movsd qword [ebp - 0xf0], xmm0
movaps xmm0, xmmword [0x103a0dc0]
subsd xmm1, xmm4
movsd qword [ebp - 0xd0], xmm3
movups xmmword [ebp - 0xe0], xmm0
movsd qword [ebp - 0xe8], xmm2
addsd xmm1, xmm6
movsd qword [ebp - 0xc8], xmm1
je 0x10016ceb
movaps xmm0, xmmword [0x103a0dd0]
mov eax, dword [ebp - 0x34]
movd xmm1, dword [ebp - 0x2c]
movsd xmm4, qword [ecx + 0x30]
lea ecx, [ebp - 0x120]
movups xmmword [ebp - 0x120], xmm0
movaps xmm0, xmmword [0x103a0dc0]
movups xmmword [ebp - 0x110], xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm0, qword [eax*8 + 0x101b78d0]
movsd qword [ebp - 0xf8], xmm1
lea eax, [ebp - 0x190]
movaps xmm1, xmm4
movsd qword [ebp - 0x100], xmm6
push eax
lea eax, [ebp - 0x1c0]
movsd qword [ebp - 0x180], xmm6
divsd xmm1, xmm0
push eax
movaps xmm0, xmmword [0x103a0dd0]
movups xmmword [ebp - 0x190], xmm0
xorps xmm0, xmm0
movsd qword [ebp - 0x178], xmm1
movups xmmword [ebp - 0x170], xmm0
call fcn.10073246
movaps xmm0, xmmword [0x103a0dd0]
lea ecx, [ebp - 0x120]
push ecx
lea ecx, [ebp - 0x190]
movsd qword [ebp - 0x100], xmm6
movups xmmword [ebp - 0x120], xmm0
push ecx
movaps xmm0, xmmword [0x103a0dc0]
xorps xmm4, xmm5
mov ecx, eax
movsd qword [ebp - 0xf8], xmm4
movups xmmword [ebp - 0x110], xmm0
call fcn.10073246
lea ecx, [ebp - 0xf0]
push ecx
lea ecx, [ebp - 0x1f0]
push ecx
mov ecx, eax
call fcn.10073246
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0xf0], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [ebp - 0xe0], xmm0
movups xmm0, xmmword [eax + 0x20]
movups xmmword [ebp - 0xd0], xmm0
mov edi, dword [ebp - 0x50]
lea eax, [ebp - 0xf0]
push eax
mov ecx, edi
call fcn.10017c87
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx + 4]
mov ecx, edi
mov dword [ebp - 0x3c], eax
mov eax, dword [edi]
mov eax, dword [eax + 0x10]
call eax
test al, al
jne 0x10016eff
mov eax, dword [ebp - 0x3c]
cmp byte [eax + 0x4d], 0
jne 0x10016eff
add eax, 0x40
mov dword [ebp - 0xb8], 0x101b81a0
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xb0], 0
mov byte [ebp - 0xac], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xb8]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x4c]
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x70], 0x103e6530
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp - 0x68], 0
mov dword [ebp - 0x64], eax
je 0x10016dd9
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], eax
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x48]
mov edi, dword [ecx + 0x18]
test edi, edi
je 0x10016dc5
cmp ecx, dword [edi]
jne 0x10016da1
mov eax, dword [edi + 8]
test eax, eax
jne 0x10016db2
push 0x139049b
call dword [sym.imp.Mso20Win32Client.dll_Ordinal_1360]
mov eax, dword [edi + 8]
mov ecx, dword [ebp - 0x48]
cmp eax, dword [ebp - 0x68]
je 0x10016e75
mov edi, dword [edi + 4]
test edi, edi
jne 0x10016d96
mov edi, dword [ecx + 0x18]
lea eax, [ebp - 0x70]
mov dword [ebp - 0x6c], edi
mov dword [ecx + 0x18], eax
lea ecx, [ebp - 0x4c]
call fcn.1007f80f
mov edi, dword [ebp - 0x50]
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x10016deb
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x3c]
mov dword [eax + 0x10], 0
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x10016e01
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x68], 0
mov dword [eax + 0x14], 0
mov byte [eax + 0x38], 1
je 0x10016ee6
mov eax, dword [ebp - 0x70]
lea ecx, [ebp - 0x60]
push eax
mov dword [ebp - 0x4c], eax
mov byte [ebp - 0x41], 0
call fcn.1007f7f6
mov edx, dword [ebp - 0x4c]
mov eax, dword [edx + 0x18]
lea ecx, [edx + 0x18]
mov dword [ebp - 0x54], ecx
test eax, eax
je 0x10016ecc
nop dword [eax]
cmp edx, dword [eax]
jne 0x10016e4a
cmp dword [eax + 8], 0
jne 0x10016e5d
push 0x139049f
call dword [sym.imp.Mso20Win32Client.dll_Ordinal_1360]
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x4c]
mov eax, dword [ecx]
lea esi, [ebp - 0x70]
cmp esi, eax
mov esi, dword [ebp - 0x58]
je 0x10016eb6
lea ecx, [eax + 4]
mov eax, dword [ecx]
mov dword [ebp - 0x54], ecx
test eax, eax
je 0x10016ecc
jmp 0x10016e40
mov eax, dword [edi + 0xc]
cmp eax, dword [ebp - 0x64]
je 0x10016dce
push dword [ecx + 0x1c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov edi, dword [ebp - 0x48]
add edi, 0x20
lock inc dword [edi]
lea ecx, [ebp - 0x4c]
call fcn.1007f80f
mov eax, dword [ebp - 0x48]
push 0
push 0x32
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
lock dec dword [edi]
mov eax, dword [ebp - 0x48]
jmp 0x10016d85
mov eax, dword [ebp - 0x6c]
mov dword [ecx], eax
cmp dword [edx + 0x20], 0
mov esi, dword [ebp - 0x58]
mov edi, dword [ebp - 0x98]
setg byte [ebp - 0x41]
lea ecx, [ebp - 0x60]
call fcn.1007f80f
cmp byte [ebp - 0x41], 0
je 0x10016ee6
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp - 0xb0]
mov dword [ebp - 0xb8], 0x101b81a0
test ecx, ecx
je 0x10016eff
call fcn.1002180d
lea eax, [edi + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x10016f16
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x54]
mov ecx, dword [0x103e65e0]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10076000
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc
mov ecx, 0x858307
call fcn.10127da0
mov ecx, 0x858308
call fcn.10127da0
mov ecx, 0x858302
call fcn.10127da0
mov ecx, 0x858305
call fcn.10127da0
jmp 0x10016f6c
mov ecx, dword [ebp - 0x3c]
mov ecx, 0x858303
call fcn.10127da0
mov ecx, 0x858306
call fcn.10127da0
jmp 0x10016f85
mov dl, byte [ebp - 0x94]
push 0x2822c8
call dword [sym.imp.Mso20Win32Client.dll_Ordinal_1360]
mov ecx, 0x85830c
call fcn.10127da0
mov ecx, 0x85830b
call fcn.10127da0
mov ecx, 0x85830d
call fcn.10127da0
mov ecx, 0x85830a
call fcn.10127da0
mov ecx, 0x858309
call fcn.10127da0
int3