Function at 0x10016a70
Capabilities:
Encode data using xor
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10040610
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x10071020]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov dword [ebp - 0x14], ebx
mov eax, ecx
mov dword [ebp - 0x10], eax
cmp byte [ebp + 8], 0
jne 0x10016b8d
mov edi, dword [eax]
test edi, edi
je 0x10016cd3
push 0xc
call fcn.10002a34
mov esi, eax
add esp, 4
mov dword [ebp + 8], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x10016af5
push str.ExcelDna.ManagedHost
mov dword [esi + 4], 0
mov dword [esi + 8], 1
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [esi], eax
test eax, eax
je 0x10016cdd
jmp 0x10016af7
xor esi, esi
mov dword [ebp - 4], 0xffffffff
mov dword [ebp + 8], esi
test esi, esi
je 0x10016cdd
mov dword [ebp - 4], 1
mov ecx, dword [ebx]
test ecx, ecx
je 0x10016b1c
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
push ebx
mov dword [ebx], 0
push dword [esi]
mov eax, dword [edi]
push edi
call dword [eax + 0xb0]
mov edi, eax
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lock xadd dword [esi + 8], ecx
dec ecx
jne 0x10016b77
mov eax, dword [esi]
test eax, eax
je 0x10016b55
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x10016b6c
push eax
call fcn.10002d7e
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
call fcn.10002a03
add esp, 8
mov dword [ebp + 8], 0
test edi, edi
js 0x10016b90
cmp dword [ebx], 0
jne 0x10016cbf
jmp 0x10016b90
mov edi, dword [ebp + 8]
push str.ASSEMBLY
push str.EXCELDNA.MANAGEDHOST
push dword [0x1007c040]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
jne 0x10016bd6
mov edx, 0x86
push edi
push 0x76
lea ecx, [edx - 4]
call fcn.10016650
add esp, 8
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push dword [0x1007c040]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push dword [0x1007c040]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
push edi
push 0
push 0x11
call dword [sym.imp.OLEAUT32.dll_SafeArrayCopyData]
mov esi, eax
push esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.OLEAUT32.dll_SafeArrayUnlock]
push edi
push ebx
push dword [esi + 0xc]
call fcn.100055c0
add esp, 0xc
push esi
call dword [sym.imp.OLEAUT32.dll_SafeArrayAccessData]
mov dword [ebp - 4], 2
lea eax, [ebp + 8]
push eax
push esi
call dword [sym.imp.OLEAUT32.dll_SafeArrayUnaccessData]
mov edi, dword [esi + 0x10]
xor edx, edx
test edi, edi
jle 0x10016c57
mov ecx, dword [ebp + 8]
mov eax, edx
and eax, 7
mov al, byte [eax + 0x10047064]
xor byte [ecx + edx], al
inc edx
cmp edx, edi
jl 0x10016c41
push esi
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
mov ebx, dword [ebp - 0x10]
mov ebx, dword [ebx]
test ebx, ebx
je 0x10016cd3
mov edi, dword [ebp - 0x14]
mov ecx, dword [edi]
test ecx, ecx
je 0x10016c76
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
push edi
mov dword [edi], 0
mov eax, dword [ebx]
push esi
push ebx
call dword [eax + 0xb4]
test eax, eax
jns 0x10016cb1
mov edx, 0x87
push eax
push 0x76
lea ecx, [edx - 5]
call fcn.10016650
add esp, 8
mov dword [ebp - 4], 0xffffffff
push esi
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetDim]
jmp 0x10016bbf
mov dword [ebp - 4], 0xffffffff
push esi
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetDim]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004003
call fcn.100027e0
push 0x8007000e
call fcn.100027e0
int3