Function at 0x40b760
Capabilities:
Get common file path
Set registry value

Disassembly:
sub esp, 0x520
mov eax, dword [str._q_]
xor eax, esp
push esi
mov dword [esp + 0x520], eax
push 0x104
lea eax, [esp + 0x10]
push eax
mov esi, ecx
mov byte [esp + 0x14], 0
call fcn.0040a440
mov al, byte [esp + 0xc]
test al, al
lea eax, [esp + 0xc]
jne 0x40b79c
mov eax, str.Unknown
mov ecx, dword [esi]
push eax
push str.Agent_installs_drivers:__s.
push ecx
call fcn.00404120
mov eax, dword [esi]
mov ecx, dword [eax + 0x40]
add esp, 0xc
test ecx, ecx
je 0x40b899
mov cl, byte [esp + 0xc]
test cl, cl
je 0x40b81d
mov eax, dword [eax + 0x1c]
lea edx, [esp + 0xc]
push edx
push eax
call fcn.0040f315
add esp, 8
test eax, eax
je 0x40b81d
mov eax, dword [esi]
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x40b7f6
lea ecx, [esp + 0xc]
push str.Legacy
push ecx
call fcn.0040f315
add esp, 8
test eax, eax
je 0x40b81d
lea edx, [esp + 0xc]
push str.Legacy
push edx
call fcn.0040f315
add esp, 8
test eax, eax
jne 0x40b8e4
mov eax, dword [esi]
mov ecx, dword [eax + 0x58]
test ecx, ecx
jne 0x40b8e4
mov ecx, dword [esi]
push str.Installing_drivers...
push ecx
call fcn.00404120
mov edx, dword [esi]
mov eax, dword [edx + 0x1c]
add esp, 8
push eax
mov ecx, esi
call fcn.0040a4e0
push 0x104
lea ecx, [esp + 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, dword [esi]
mov eax, dword [edx + 0x54]
test eax, eax
je 0x40b90c
push 8
push 0
lea eax, [esp + 0x118]
push eax
push str.KaseyaD.VXD
push str._TARGETDIR_Drivers
mov ecx, esi
call fcn.0040acc0
push 8
push 0
lea ecx, [esp + 0x118]
push ecx
push str.KaseyaSP.dll
push str._TARGETDIR_Drivers
mov ecx, esi
call fcn.0040acc0
jmp 0x40ba8d
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x40b8e4
lea ecx, [esp + 0xc]
push str.Legacy
push ecx
call fcn.0040f315
add esp, 8
test eax, eax
jne 0x40b8c3
mov edx, dword [esi]
mov eax, dword [edx + 0x58]
test eax, eax
je 0x40b81d
mov al, byte [esp + 0xc]
test al, al
jne 0x40b8e4
mov eax, dword [esi]
mov ecx, dword [eax + 0x58]
test ecx, ecx
je 0x40b81d
push str.Legacy
mov ecx, esi
call fcn.0040a4e0
mov ecx, dword [esi]
push str.Other_agent_has_installed_the_drivers._Driver_installation_is_skipped.
push ecx
call fcn.00404120
add esp, 8
xor eax, eax
pop esi
mov ecx, dword [esp + 0x51c]
xor ecx, esp
call fcn.0040f175
add esp, 0x520
ret
push ebx
push edi
call fcn.0040d120
test eax, eax
je 0x40ba01
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x40ba6e
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Wow64DisableWow64FsRedirection
push ebx
call ebp
push str.Wow64RevertWow64FsRedirection
push ebx
mov edi, eax
call ebp
test edi, edi
mov ebp, eax
je 0x40b9f7
test ebp, ebp
je 0x40b9f7
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x18], 0
call edi
test eax, eax
je 0x40b9f7
push 0x104
lea eax, [esp + 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edi, [esp + 0x220]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40b990
mov ecx, dword [str.System32]
mov edx, dword [0x41cba4]
mov ax, word [0x41cba8]
mov dword [edi], ecx
lea ecx, [esp + 0x220]
push ecx
mov dword [edi + 4], edx
lea edx, [esp + 0x328]
push str._sdrivers
push edx
mov word [edi + 8], ax
call fcn.0040f6f9
add esp, 0xc
push 8
push str.KAPFA.sys
lea eax, [esp + 0x32c]
push eax
push str.KAPFA64.sys
push str._TARGETDIR_Drivers
mov ecx, esi
call fcn.0040acc0
lea ecx, [esp + 0x14]
push ecx
call ebp
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop ebp
jmp 0x40ba6e
xor eax, eax
jmp 0x40ba10
mov cl, byte [esp + eax + 0x118]
mov byte [esp + eax + 0x320], cl
inc eax
test cl, cl
jne 0x40ba10
lea edi, [esp + 0x320]
dec edi
jmp 0x40ba30
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40ba30
mov edx, dword [str.drivers]
mov eax, dword [0x41cb8c]
mov cl, byte [0x41cb90]
push 8
mov dword [edi], edx
push 0
lea edx, [esp + 0x328]
push edx
mov dword [edi + 4], eax
push str.KAPFA.sys
mov byte [edi + 8], cl
push str._TARGETDIR_Drivers
mov ecx, esi
call fcn.0040acc0
push 8
push 0
lea eax, [esp + 0x120]
push eax
push str.KaseyaSP.dll
push str._TARGETDIR_Drivers
mov ecx, esi
call fcn.0040acc0
pop edi
pop ebx
mov ecx, dword [esi]
mov edx, dword [ecx + 0x1c]
push edx
push str.SOFTWAREKaseyaAgent
lea eax, [esp + 0x424]
push str._s_s
push eax
call fcn.0040f6f9
add esp, 0x10
lea ecx, [esp + 4]
push ecx
push 0x20006
push 0
lea edx, [esp + 0x428]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40bb41
lea eax, [esp + 0x110]
push eax
lea ecx, [esp + 0x218]
push str._sKaseyaSP.dll
push ecx
call fcn.0040f6f9
lea eax, [esp + 0x220]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40baf7
sub eax, edx
inc eax
push eax
mov eax, dword [esp + 8]
lea edx, [esp + 0x218]
push edx
push 1
push 0
push str.WinSock2LspDll
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop esi
mov ecx, dword [esp + 0x51c]
xor ecx, esp
call fcn.0040f175
add esp, 0x520
ret
mov eax, dword [esi]
lea edx, [esp + 0x41c]
push edx
push str.Could_not_open_key:__s.
push eax
call fcn.00404120
mov ecx, dword [esp + 0x52c]
add esp, 0xc
pop esi
xor ecx, esp
xor eax, eax
call fcn.0040f175
add esp, 0x520
ret