Function at 0x402180
Capabilities:
Get common file path
Query or enumerate registry value
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5a4
mov eax, dword [0x554efc]
xor eax, ebp
mov dword [ebp - 4], eax
push str.ZuluComNetCtrl.dll
mov dword [ebp - 0x5a4], edx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4021ed
push 0x104
lea ecx, [ebp - 0x594]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x104
lea eax, [ebp - 0x594]
push eax
push 0x556608
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 0x594]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00457db8
mov esp, ebp
pop ebp
ret
push ebx
push esi
push edi
lea eax, [ebp - 0x554]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x104
lea eax, [ebp - 0x24c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
lea eax, [ebp - 0x24c]
push 0x5c
push eax
call ebx
mov esi, eax
lea eax, [ebp - 0x24c]
push 0x2f
push eax
call ebx
add esp, 0x10
cmp esi, eax
cmova eax, esi
lea edi, [eax + 2]
test eax, eax
jne 0x402249
lea edi, [ebp - 0x24c]
push str.ZuluComNetCtrl.dll
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x104
lea eax, [ebp - 0x24c]
push eax
push 0x556608
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
test edi, edi
jne 0x402297
lea eax, [ebp - 0x24c]
push 0x5c
push eax
call ebx
mov esi, eax
lea eax, [ebp - 0x24c]
push 0x2f
push eax
call ebx
add esp, 0x10
cmp esi, eax
cmova eax, esi
test eax, eax
je 0x4022bc
lea edi, [eax + 2]
lea eax, [ebp - 0x24c]
cmp edi, eax
jbe 0x4022bc
movzx esi, word [edi - 2]
xor eax, eax
mov word [edi - 2], ax
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov word [edi - 2], si
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 2
push 0x55050c
mov edi, eax
call fcn.00407de0
test edi, edi
jne 0x4022e4
push 0xf
push str.Failed_to_load
jmp 0x4022eb
push 7
push str.Loaded
call fcn.00407de0
lea ecx, [ebp - 0x24c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402300
sub ecx, edx
lea eax, [ebp - 0x24c]
sar ecx, 1
push ecx
push eax
call fcn.00407de0
test edi, edi
jne 0x4025a7
call fcn.00457b20
test eax, eax
je 0x4023f7
cmp byte [eax + 0x14], 0
je 0x4023f7
mov eax, dword [eax + 8]
test eax, eax
je 0x4023f7
push 0x104
lea ecx, [ebp - 0x24c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x24c]
call fcn.00402100
mov esi, eax
push str.ZuluComNetCtrl.dll
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x104
lea eax, [ebp - 0x24c]
push eax
push 0x556608
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov edx, esi
lea ecx, [ebp - 0x24c]
call fcn.00402130
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 2
push 0x55050c
mov edi, eax
call fcn.00407de0
test edi, edi
jne 0x4023be
push 0xf
push str.Failed_to_load
jmp 0x4023c5
push 7
push str.Loaded
call fcn.00407de0
lea ecx, [ebp - 0x24c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4023d3
sub ecx, edx
lea eax, [ebp - 0x24c]
sar ecx, 1
push ecx
push eax
call fcn.00407de0
test edi, edi
jne 0x4025a7
mov ecx, dword [ebp - 0x5a4]
mov edx, 0x484b24
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40241d
add ecx, 4
add edx, 4
sub esi, 4
jae 0x402407
jmp 0x4025a7
push str.CLSID_
lea eax, [ebp - 0x34c]
mov dword [ebp - 0x598], 0x104
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x59c]
push eax
push dword [ebp - 0x5a4]
call dword [sym.imp.ole32.dll_StringFromCLSID]
test eax, eax
jne 0x40259e
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 0x340]
push 0x40
push dword [ebp - 0x59c]
push eax
call esi
push dword [ebp - 0x59c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push 0x5504ec
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x5a0]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x34c]
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40259e
lea eax, [ebp - 0x598]
push eax
lea eax, [ebp - 0x24c]
push eax
push 0
push 0
push 0
push dword [ebp - 0x5a0]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x5a0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0x24c]
push eax
push 0x556608
call esi
lea eax, [ebp - 0x24c]
push 0x5c
push eax
call ebx
mov esi, eax
lea eax, [ebp - 0x24c]
push 0x2f
push eax
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
add esp, 0x10
cmp esi, eax
cmova eax, esi
test eax, eax
je 0x40253e
lea edi, [eax + 2]
lea eax, [ebp - 0x24c]
cmp edi, eax
jbe 0x40253e
movzx esi, word [edi - 2]
xor eax, eax
mov word [edi - 2], ax
lea eax, [ebp - 0x24c]
push eax
call ebx
mov word [edi - 2], si
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 2
push 0x55050c
mov edi, eax
call fcn.00407de0
test edi, edi
jne 0x402566
push 0xf
push str.Failed_to_load
jmp 0x40256d
push 7
push str.Loaded
call fcn.00407de0
lea ecx, [ebp - 0x24c]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402580
sub ecx, edx
lea eax, [ebp - 0x24c]
sar ecx, 1
push ecx
push eax
call fcn.00407de0
jmp 0x4025ad
xor eax, eax
mov word [ebp - 0x24c], ax
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x554]
push eax
call ebx
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00457db8
mov esp, ebp
pop ebp
ret