Function at 0x41f740
Capabilities:
Check for time delay via gettickcount
Check if file exists
Copy file
Create service
Delete file
Extract resource via kernel32 functions
Get common file path
Query service status
Start service

Disassembly:
push 0xffffffffffffffff
push 0x484d31
mov eax, dword fs:[0]
push eax
sub esp, 0xa48
mov eax, dword [0x504a70]
xor eax, esp
mov dword [esp + 0xa44], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x504a70]
xor eax, esp
push eax
lea eax, [esp + 0xa5c]
mov dword fs:[0], eax
mov eax, dword [esp + 0xa6c]
mov edi, dword [esp + 0xa74]
mov esi, dword [esp + 0xa78]
xor ebx, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ebx
push 0xf003f
push ebx
push ebx
mov dword [esp + 0xa70], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebp, eax
cmp ebp, ebx
mov dword [esp + 0x1c], ebp
jne 0x41f83f
lea ecx, [esp + 0x1c]
push ecx
call fcn.0041f600
mov esi, dword [esp + 0x1c]
push eax
push str.Could_not_open_Service_Manager:
push esi
mov byte [esp + 0xa74], 1
call fcn.004040f0
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
add esp, 0x10
mov byte [esp + 0xa64], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41f808
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xa70]
add eax, 0xfffffff0
mov dword [esp + 0xa64], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41fddd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x41fddd
lea ecx, [esp + 0x258]
push ecx
push 0x400
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
lea edx, [esp + 0xa70]
push edx
lea eax, [esp + 0x18]
push 0x48cbf8
push eax
call fcn.004040f0
push str..sys
push eax
lea ecx, [esp + 0x34]
push ecx
mov byte [esp + 0xa7c], 2
call fcn.00404010
mov eax, dword [eax]
push eax
lea edx, [esp + 0x274]
push 0x400
push edx
call fcn.00469966
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
add esp, 0x24
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41f8b9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0xa64], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41f8e0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, ebx
jne 0x41fa17
push 0x208
lea ecx, [esp + 0x54]
push ecx
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x24]
call fcn.00403e00
mov eax, dword [esp + 0x20]
push 0x5c
push eax
mov byte [esp + 0xa6c], 3
call fcn.00469c2b
add esp, 8
cmp eax, ebx
jne 0x41f927
or eax, 0xffffffff
jmp 0x41f92d
sub eax, dword [esp + 0x20]
sar eax, 1
add eax, 1
push eax
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x28]
call fcn.00414dd0
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0xa68], 4
call fcn.00404670
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0xa64], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41f979
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str..sys
lea ecx, [esp + 0xa74]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.00404010
add esp, 0xc
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xa6c], 5
call fcn.00407d00
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0xa64], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41f9d3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x20]
push ebx
lea ecx, [esp + 0x25c]
push ecx
push edx
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0xa64], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41fb1d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x41fb1d
push esi
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41fa6c
push str.Could_not_open_module_of_resource
mov esi, dword [esp + 0x1c]
mov ecx, esi
call fcn.00403e00
mov eax, dword [esp + 0xa70]
add eax, 0xfffffff0
mov dword [esp + 0xa64], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41fddd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x41fddd
push 0xa
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceW]
mov edi, eax
cmp edi, ebx
jne 0x41fa91
mov esi, dword [esp + 0x18]
push str.Could_not_find_resource
mov ecx, esi
call fcn.00403e00
jmp 0x41fdd1
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
push edi
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.DLL_LoadResource]
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov esi, eax
cmp esi, ebx
jne 0x41fac5
mov esi, dword [esp + 0x18]
push str.Could_not_lock_resource
mov ecx, esi
call fcn.00403e00
jmp 0x41fdd1
lea ecx, [esp + 0x40]
call fcn.00462ee4
push ebx
push 0x1001
lea ecx, [esp + 0x260]
push ecx
lea ecx, [esp + 0x4c]
mov byte [esp + 0xa70], 6
call fcn.00463352
test eax, eax
je 0x41fdb1
push ebp
push esi
lea ecx, [esp + 0x48]
call fcn.00462c32
lea ecx, [esp + 0x40]
call fcn.00462e82
lea ecx, [esp + 0x40]
mov byte [esp + 0xa64], bl
call fcn.00462fe0
mov ebp, dword [esp + 0x1c]
lea edx, [esp + 0x258]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x41fb39
push str.Driver_binary_not_found
jmp 0x41fa2a
mov esi, dword [esp + 0xa70]
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x26c]
push ecx
push 1
push 3
push 1
push 0xf003f
push esi
push esi
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebp, dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
cmp edi, ebx
jne 0x41fbf7
call ebp
cmp eax, 0x431
jne 0x41fbc4
mov edx, dword [esp + 0x1c]
push 0xf003f
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, ebx
jne 0x41fbf7
lea eax, [esp + 0x14]
push eax
call fcn.0041f600
mov esi, dword [esp + 0x1c]
push eax
push str.Could_not_open_driver:
push esi
mov byte [esp + 0xa74], 7
call fcn.004040f0
add esp, 0x10
lea ecx, [esp + 0x14]
call fcn.00419210
jmp 0x41fdd1
lea ecx, [esp + 0x14]
push ecx
call fcn.0041f600
mov esi, dword [esp + 0x1c]
push eax
push str.Could_not_install_driver:
push esi
mov byte [esp + 0xa74], 8
call fcn.004040f0
add esp, 0x10
lea ecx, [esp + 0x14]
call fcn.00419210
jmp 0x41fdd1
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x41fc60
call ebp
cmp eax, 0x420
je 0x41fd45
call ebp
cmp eax, 0x37
jne 0x41fc2d
mov esi, dword [esp + 0x18]
push str.Driver_does_not_exist
mov ecx, esi
call fcn.00403e00
jmp 0x41fdd1
lea edx, [esp + 0x14]
push edx
call fcn.0041f600
mov esi, dword [esp + 0x1c]
push eax
push str.Could_not_start_driver:
push esi
mov byte [esp + 0xa74], 9
call fcn.004040f0
add esp, 0x10
lea ecx, [esp + 0x14]
call fcn.00419210
jmp 0x41fdd1
lea eax, [esp + 0x24]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x41fca3
lea ecx, [esp + 0x14]
push ecx
call fcn.0041f600
mov esi, dword [esp + 0x1c]
push eax
push str.Could_not_wait_for_driver_start:
push esi
mov byte [esp + 0xa74], 0xa
call fcn.004040f0
add esp, 0x10
lea ecx, [esp + 0x14]
call fcn.00419210
jmp 0x41fdd1
mov ebp, dword [sym.imp.KERNEL32.DLL_GetTickCount]
call ebp
cmp dword [esp + 0x28], 2
mov ebx, dword [esp + 0x38]
mov esi, eax
jne 0x41fd20
jmp 0x41fcc0
mov eax, 0xcccccccd
mul dword [esp + 0x3c]
shr edx, 3
cmp edx, 0x3e8
jae 0x41fcdb
mov edx, 0x3e8
jmp 0x41fce8
cmp edx, 0x2710
jbe 0x41fce8
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.DLL_Sleep]
lea edx, [esp + 0x24]
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41fd20
cmp dword [esp + 0x38], ebx
jbe 0x41fd0f
call ebp
mov ebx, dword [esp + 0x38]
mov esi, eax
jmp 0x41fd19
call ebp
sub eax, esi
cmp eax, dword [esp + 0x3c]
ja 0x41fd20
cmp dword [esp + 0x28], 2
je 0x41fcc0
lea eax, [esp + 0x258]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
cmp dword [esp + 0x28], 4
jne 0x41fd5a
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov ecx, dword [esp + 0x1c]
push ecx
call esi
mov esi, dword [esp + 0x18]
push 0x4f1164
mov ecx, esi
call fcn.00403e00
jmp 0x41fdd1
lea ecx, [esp + 0x1c]
call fcn.00403dd0
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
push edx
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x30]
push ecx
push edx
push eax
lea ecx, [esp + 0x30]
push str.Service_not_started.__n__Current_State:__d_n__Exit_Code:__d_n__Service_Specific_Exit_Code:__d_n__Check_Point:__d_n__Wait_Hint:__d_n
push ecx
mov byte [esp + 0xa80], 0xb
call fcn.00405230
mov esi, dword [esp + 0x34]
add esp, 0x1c
lea edx, [esp + 0x1c]
push edx
mov ecx, esi
call fcn.00404650
lea ecx, [esp + 0x1c]
call fcn.00419210
jmp 0x41fdd1
mov esi, dword [esp + 0x18]
push str.Could_not_create_driver_file
mov ecx, esi
call fcn.00403e00
lea ecx, [esp + 0x40]
mov byte [esp + 0xa64], bl
call fcn.00462fe0
lea ecx, [esp + 0xa70]
call fcn.00419210
mov eax, esi
mov ecx, dword [esp + 0xa5c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa44]
xor ecx, esp
call fcn.0046875c
add esp, 0xa54
ret