Function at 0x405980
Capabilities:
Extract resource via kernel32 functions
Get common file path
Get system information on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e5bc2
mov eax, dword fs:[0]
push eax
sub esp, 0x2a0
mov eax, dword [0x526060]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebp + 8]
push str.CInstallCtrl::Install____r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
cmp word [edi], 0
jne 0x4059d0
xor ecx, ecx
jmp 0x4059e4
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4059d5
sub ecx, edx
sar ecx, 1
push ecx
lea esi, [ebx + 4]
push edi
mov ecx, esi
call fcn.00401d30
cmp dword [esi + 0x14], 8
jb 0x4059fa
mov ecx, dword [esi]
jmp 0x4059fc
mov ecx, esi
mov eax, dword [esi + 0x10]
cmp word [ecx + eax*2 - 2], 0x5c
jne 0x405a2d
lea ecx, [eax - 1]
cmp eax, ecx
jae 0x405a18
push str.invalid_string_position
call fcn.0040c624
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], ecx
jb 0x405a25
mov eax, dword [esi]
jmp 0x405a27
mov eax, esi
xor edx, edx
mov word [eax + ecx*2], dx
cmp dword [esi + 0x14], 8
jb 0x405a37
mov ecx, dword [esi]
jmp 0x405a39
mov ecx, esi
call fcn.0040b430
cmp eax, 1
je 0x405a5f
push 1
push 0x515274
mov ecx, esi
call fcn.00407700
push 4
push 0x515278
mov ecx, eax
call fcn.00407700
cmp dword [esi + 0x14], 8
jb 0x405a69
mov ecx, dword [esi]
jmp 0x405a6b
mov ecx, esi
call fcn.0040bec0
cmp dword [esi + 0x14], 8
jb 0x405a7a
mov ecx, dword [esi]
jmp 0x405a7c
mov ecx, esi
mov eax, dword [esi + 0x10]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x405a95
push 1
push 0x515274
mov ecx, esi
call fcn.00407700
push 0
mov ecx, ebx
call fcn.00406920
push 0x104
lea eax, [ebp - 0x21c]
mov byte [ebp - 0x27d], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov dword [ebp - 0x220], 7
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x234]
mov ax, word [ebp - 0x21c]
mov word [ebp - 0x234], ax
xor eax, eax
push 0xd
push str.:ProgramData
mov dword [ebp - 0x224], 1
mov word [ebp - 0x232], ax
call fcn.00407700
push 4
xor eax, eax
mov dword [ebp - 0x290], 7
push 0x515278
lea ecx, [ebp - 0x2a4]
mov dword [ebp - 0x294], 0
mov word [ebp - 0x2a4], ax
call fcn.00401d30
lea eax, [ebp - 0x2a4]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x24c]
push 0x515274
push eax
call fcn.00407b80
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 2
call fcn.00407910
mov eax, dword [ebp - 0x238]
cmp eax, 8
jb 0x405b7b
inc eax
lea ecx, [ebp - 0x24c]
push eax
push dword [ebp - 0x24c]
call fcn.00401e90
xor eax, eax
mov dword [ebp - 0x238], 7
mov word [ebp - 0x24c], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x290]
mov dword [ebp - 0x23c], 0
cmp eax, 8
jb 0x405bb9
inc eax
lea ecx, [ebp - 0x2a4]
push eax
push dword [ebp - 0x2a4]
call fcn.00401e90
cmp dword [ebp - 0x220], 8
lea ecx, [ebp - 0x234]
cmovae ecx, dword [ebp - 0x234]
call fcn.0040bfe0
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ax, word [ebp - 0x258]
cmp ax, 9
je 0x405bf6
cmp ax, 6
je 0x405bf6
xor eax, eax
jmp 0x405bfb
mov eax, 1
test eax, eax
mov dword [ebp - 0x290], 7
mov edx, str.zzdsMenu_64.dll
mov dword [ebp - 0x294], 0
mov ecx, str.zzdsMenu_32.dll
cmove edx, ecx
xor eax, eax
mov word [ebp - 0x2a4], ax
cmp word [edx], ax
jne 0x405c30
xor ecx, ecx
jmp 0x405c44
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405c35
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2a4]
call fcn.00401d30
lea eax, [ebp - 0x2a4]
mov byte [ebp - 4], 3
push eax
mov ecx, ebx
call fcn.00407210
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x290]
cmp eax, 8
jb 0x405c85
inc eax
lea ecx, [ebp - 0x2a4]
push eax
push dword [ebp - 0x2a4]
call fcn.00401e90
push 0xf
xor eax, eax
mov dword [ebp - 0x290], 7
push str.ZZWordAddin.dll
lea ecx, [ebp - 0x2a4]
mov dword [ebp - 0x294], 0
mov word [ebp - 0x2a4], ax
call fcn.00401d30
lea eax, [ebp - 0x2a4]
mov byte [ebp - 4], 4
push eax
mov ecx, ebx
call fcn.00407210
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x290]
cmp eax, 8
jb 0x405ce8
inc eax
lea ecx, [ebp - 0x2a4]
push eax
push dword [ebp - 0x2a4]
call fcn.00401e90
push 0
mov dword [ebp - 0x28c], 0
mov dword [ebp - 0x2a8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
push str.CInstallCtrl::LoadResource____r_n
mov dword [ebp - 0x284], edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.ZIPRES
push 0x84
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
jne 0x405d36
mov dword [ebp - 0x284], eax
jmp 0x405d84
push edi
push dword [ebp - 0x284]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x288], eax
push edi
test eax, eax
jne 0x405d60
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [ebp - 0x284], 0
jmp 0x405d84
push dword [ebp - 0x284]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0x288]
mov dword [ebp - 0x28c], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x284], eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
push str.CInstallCtrl::LoadResource____r_n
mov dword [ebp - 0x288], edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x515380
push 0x83
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x405df8
push edi
push dword [ebp - 0x288]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x2ac], eax
push edi
test eax, eax
jne 0x405dd8
call dword [sym.imp.KERNEL32.dll_FreeResource]
xor edi, edi
jmp 0x405df8
push dword [ebp - 0x288]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0x2ac]
mov dword [ebp - 0x2a8], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
cmp dword [ebp - 0x284], 0
je 0x405ece
cmp dword [ebp - 0x28c], 0
je 0x405ece
test edi, edi
je 0x405ece
cmp dword [ebp - 0x2a8], 0
je 0x405ece
push 0x48
lea eax, [ebp - 0x27c]
push 0
push eax
call fcn.004c4090
add esp, 0xc
lea ecx, [ebp - 0x27c]
push edi
call fcn.00401680
sub esp, 0x28
mov byte [ebp - 4], 5
mov ecx, esp
push 0x64
mov dword [ecx], vtable.std::_Func_base_void__int_.0
mov dword [ecx], vtable.._AV___Func_impl_V___Binder_U_Unforced_std__P8CInstallCtrl__AEXH_ZQAV3_ABU___Ph__00_2__std__V__allocator_H_2_XH_std__.0
mov dword [ecx + 4], 0x406900
mov al, byte [ebp - 0x228]
mov byte [ecx + 8], al
mov dword [ecx + 0xc], ebx
mov dword [ecx + 0x24], ecx
lea ecx, [ebp - 0x27c]
push 0
call fcn.004017a0
cmp dword [esi + 0x14], 8
jb 0x405e88
mov esi, dword [esi]
push esi
push dword [ebp - 0x28c]
lea ecx, [ebp - 0x27c]
push dword [ebp - 0x284]
call fcn.00401820
lea ecx, [ebp - 0x27c]
mov byte [ebp - 0x27d], al
mov byte [ebp - 4], 0
call fcn.00401730
cmp byte [ebp - 0x27d], 0
je 0x405ece
push 1
mov ecx, ebx
call fcn.00406920
mov ecx, ebx
call fcn.00407050
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x405ef1
movzx eax, byte [ebp - 0x27d]
push 0
push eax
push 0x403
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, dword [ebp - 0x220]
cmp eax, 8
jb 0x405f0f
inc eax
lea ecx, [ebp - 0x234]
push eax
push dword [ebp - 0x234]
call fcn.00401e90
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00412b06
mov esp, ebp
pop ebp
ret 4