joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4011c0
Capabilities:
Access peb ldr_data
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4213e8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x42b1d0]
xor eax, esp
mov dword [esp + 0x1c], eax
push esi
mov eax, dword [0x42b1d0]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov esi, ecx
push esi
push str.Delete_file__s.
call fcn.004124a0
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.00401370
add esp, 0xc
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0xc]
mov esi, 8
cmp dword [esp + 0x20], esi
jae 0x401226
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x401252
push str.This_file_didnt_exists__delete_file_function_exit.
call fcn.004124a0
add esp, 4
cmp dword [esp + 0x20], esi
jb 0x4012e3
mov ecx, dword [esp + 0xc]
push ecx
jmp 0x4012db
mov eax, dword [esp + 0xc]
cmp dword [esp + 0x20], esi
jae 0x401260
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x401284
mov ecx, dword [esp + 0xc]
cmp dword [esp + 0x20], esi
jae 0x401279
lea ecx, [esp + 0xc]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0xc]
cmp dword [esp + 0x20], esi
jae 0x40129a
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4012d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeleteFile_error__d
call fcn.00412560
add esp, 8
cmp dword [esp + 0x20], esi
jb 0x4012cc
mov edx, dword [esp + 0xc]
push edx
call fcn.0041288e
add esp, 4
xor al, al
jmp 0x4012e5
cmp dword [esp + 0x20], esi
jb 0x4012e3
mov eax, dword [esp + 0xc]
push eax
call fcn.0041288e
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.00412899
add esp, 0x2c
ret

Function at 0x401310
Capabilities:
Create directory

Disassembly:
push ecx
push 0
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
test eax, eax
je 0x40132c
cmp eax, 0x50
je 0x40132c
cmp eax, 0xb7
jne 0x401335
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x401357
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x401357
push str.CreatePCFolder_failed.
call fcn.00412560
add esp, 4
xor al, al
pop ecx
ret
push str.CreatePCFolder_successfully.
call fcn.004124a0
add esp, 4
mov al, 1
pop ecx
ret
Function at 0x402870
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x808
mov eax, dword [0x42b1d0]
xor eax, esp
mov dword [esp + 0x804], eax
push ebp
mov ebp, dword [esp + 0x810]
push esi
push 0x800
lea eax, [esp + 0xd]
push 0
push eax
mov byte [esp + 0x14], 0
call fcn.004183e0
push 0x42422c
push edi
call fcn.00413b3c
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x4028ce
pop esi
pop ebp
mov ecx, dword [esp + 0x804]
xor ecx, esp
call fcn.00412899
add esp, 0x808
ret
push esi
push 0x800
lea ecx, [esp + 0x10]
push 1
push ecx
call fcn.00413df3
push esi
call fcn.00413fbe
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0x820], 0
call fcn.00412c85
lea eax, [esp + 0x20]
push ebp
push eax
call fcn.00413540
add esp, 0x20
mov esi, eax
neg esi
sbb esi, esi
neg esi
je 0x40291e
push edi
push str.the_eom_inf_is__s
call fcn.004124a0
add esp, 8
mov ecx, dword [esp + 0x80c]
mov eax, esi
pop esi
pop ebp
xor ecx, esp
call fcn.00412899
add esp, 0x808
ret
Function at 0x405ab0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x421179
mov eax, dword fs:[0]
push eax
sub esp, 0x468
mov eax, dword [0x42b1d0]
xor eax, esp
mov dword [esp + 0x460], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42b1d0]
xor eax, esp
push eax
lea eax, [esp + 0x47c]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
push str.CRNdisDevice::Parse_MBIM__:_Enter
mov dword [esp + 0x488], ebx
call fcn.004124a0
add esp, 4
push 0x400
lea eax, [esp + 0x78]
push ebx
push eax
call fcn.004183e0
mov eax, dword [esp + 0x49c]
add esp, 0xc
cmp dword [esp + 0x4a4], 0x10
jae 0x405b2e
lea eax, [esp + 0x490]
push 0x3ff
push eax
lea ecx, [esp + 0x7c]
push ecx
call fcn.00413040
lea edx, [esp + 0x80]
add esp, 0xc
push edx
call fcn.00412c85
mov ebp, 0xf
lea eax, [esp + 0x78]
add esp, 4
mov dword [esp + 0x70], ebp
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405b70
sub eax, edx
push eax
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x60]
call fcn.00401c30
mov byte [esp + 0x484], 1
push ebx
push 0x423d93
lea ecx, [esp + 0x44]
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
call fcn.00401c30
add esi, 0x7c
mov byte [esp + 0x484], 2
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], esi
jmp 0x405bc2
xor ebx, ebx
lea edi, [esp + 0x3c]
call fcn.004076e0
lea ecx, [esp + 0x14]
push ecx
push 0x2c
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x40], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x84]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push edx
mov esi, edi
mov byte [ecx + 4], bl
call fcn.00401850
lea eax, [esp + 0x44]
push eax
mov ecx, esi
call fcn.00410550
add esp, 0x28
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x64]
mov byte [esp + 0x490], 3
call fcn.00401850
mov esi, 0x10
mov byte [esp + 0x484], 2
cmp dword [esp + 0x38], esi
jb 0x405c3a
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0041288e
add esp, 4
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x54], esi
jae 0x405c48
lea eax, [esp + 0x40]
push eax
push str.CRNdisDevice::Parse_MBIM__:_Parse_MBIM_is___s
call fcn.004124a0
mov ebx, dword [esp + 0x20]
add esp, 8
lea edx, [esp + 0x3c]
push edx
call fcn.00407980
cmp dword [esp + 0x14], 0
je 0x405bc0
push str.CRNdisDevice::Parse_MBIM__:_Leaved
call fcn.004124a0
add esp, 4
cmp dword [esp + 0x54], esi
jb 0x405c8f
mov eax, dword [esp + 0x40]
push eax
call fcn.0041288e
add esp, 4
xor ebx, ebx
mov dword [esp + 0x54], ebp
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
cmp dword [esp + 0x70], esi
jb 0x405cb0
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.0041288e
add esp, 4
mov dword [esp + 0x70], ebp
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x4a4], esi
jb 0x405cd5
mov edx, dword [esp + 0x490]
push edx
call fcn.0041288e
add esp, 4
mov ecx, dword [esp + 0x47c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x460]
xor ecx, esp
call fcn.00412899
add esp, 0x474
ret 0x1c
Function at 0x407160
Capabilities:
Query or enumerate registry key

Disassembly:
push 0xffffffffffffffff
push 0x420f98
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x42b1d0]
xor eax, esp
mov dword [esp + 0x5c], eax
push ebp
push esi
push edi
mov eax, dword [0x42b1d0]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
push str.FindXpHotFixList_enter...
call fcn.004124a0
add esp, 4
push 0x32
lea eax, [esp + 0x3c]
push 0
push eax
call fcn.004183e0
add esp, 0xc
push 0
push 0x423d93
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], 0x32
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], 0
mov byte [esp + 0x28], 0
call fcn.00401c30
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotFix
push 0x80000002
mov dword [esp + 0x8c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x407229
push str.CheckPatchList__Err:_cmd_err
call fcn.00412560
add esp, 4
cmp dword [esp + 0x34], 0x10
jb 0x4072c9
mov edx, dword [esp + 0x20]
push edx
jmp 0x4072c1
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
xor edi, edi
mov edx, dword [esp + 0x18]
push 0
push 0
push 0
push 0
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x4c]
push ecx
push edi
push edx
call ebp
mov esi, eax
lea eax, [esp + 0x38]
push eax
call fcn.00412c85
add esp, 4
test esi, esi
jne 0x40728a
lea ecx, [esp + 0x38]
push str.kb909394
push ecx
call fcn.00413540
add esp, 8
test eax, eax
jne 0x4072e9
lea edx, [esp + 0x38]
push str.kb959765
push edx
call fcn.00413540
add esp, 8
test eax, eax
jne 0x4072e9
push 0x32
lea eax, [esp + 0x3c]
push 0
push eax
call fcn.004183e0
add esp, 0xc
inc edi
mov dword [esp + 0x14], 0x32
test esi, esi
je 0x407231
push str.FindXpHotFixList_leave...
call fcn.004124a0
add esp, 4
cmp dword [esp + 0x34], 0x10
jb 0x4072c9
mov eax, dword [esp + 0x20]
push eax
call fcn.0041288e
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x5c]
xor ecx, esp
call fcn.00412899
add esp, 0x6c
ret
lea ecx, [esp + 0x38]
push ecx
push str.FindXpHotFixList_find_the_patch__s
call fcn.004124a0
add esp, 8
cmp dword [esp + 0x34], 0x10
jb 0x40730f
mov edx, dword [esp + 0x20]
push edx
call fcn.0041288e
add esp, 4
mov eax, 1
jmp 0x4072cb
Function at 0x407320
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x420f68
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x42b1d0]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42b1d0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov edi, ecx
push str.ReInstallPatch_enter...
mov dword [esp + 0x18], edi
call fcn.004124a0
add esp, 4
lea ecx, [esp + 0x18]
call fcn.0040fd30
mov dword [esp + 0x40], 0
mov esi, dword [edi + 0xa0]
cmp esi, dword [edi + 0xa4]
jbe 0x407389
call fcn.00413a68
mov ebx, dword [edi + 0x94]
mov ebp, esi
mov esi, dword [edi + 0xa4]
cmp dword [edi + 0xa0], esi
jbe 0x4073a4
call fcn.00413a68
mov eax, dword [edi + 0x94]
test ebx, ebx
je 0x4073b2
cmp ebx, eax
je 0x4073b7
call fcn.00413a68
cmp ebp, esi
je 0x4074c7
test ebx, ebx
jne 0x407453
call fcn.00413a68
xor eax, eax
cmp ebp, dword [eax + 0x10]
jb 0x4073d8
call fcn.00413a68
cmp dword [ebp + 0x70], 1
lea edi, [ebp + 0x38]
jne 0x40749e
test ebx, ebx
jne 0x40745a
call fcn.00413a68
xor eax, eax
cmp ebp, dword [eax + 0x10]
jb 0x4073fa
call fcn.00413a68
push 0
push edi
or eax, 0xffffffff
lea esi, [esp + 0x20]
call fcn.00401b40
push 1
push 0x423ddc
mov eax, esi
call fcn.00401740
mov eax, dword [esp + 0x1c]
mov esi, 0x10
cmp dword [esp + 0x30], esi
jae 0x40742a
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40745e
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x30], esi
jae 0x407443
lea eax, [esp + 0x1c]
push eax
push str._s_is_not_exist
call fcn.00412560
add esp, 8
jmp 0x40749e
mov eax, dword [ebx]
jmp 0x4073ce
mov eax, dword [ebx]
jmp 0x4073f0
test ebx, ebx
jne 0x4074bf
call fcn.00413a68
xor eax, eax
cmp ebp, dword [eax + 0x10]
jb 0x407473
call fcn.00413a68
push 0
add edi, 0x1c
push edi
or eax, 0xffffffff
lea esi, [esp + 0x20]
call fcn.00401b40
cmp dword [esp + 0x30], 0x10
mov esi, dword [esp + 0x1c]
jae 0x407494
lea esi, [esp + 0x1c]
push 1
call fcn.004102a0
add esp, 4
test ebx, ebx
jne 0x4074c3
call fcn.00413a68
xor eax, eax
cmp ebp, dword [eax + 0x10]
jb 0x4074b3
call fcn.00413a68
mov edi, dword [esp + 0x14]
add ebp, 0x74
jmp 0x407391
mov eax, dword [ebx]
jmp 0x407469
mov eax, dword [ebx]
jmp 0x4074a9
push str.ReInstallPatch_leave...
call fcn.004124a0
add esp, 4
cmp dword [esp + 0x30], 0x10
jb 0x4074e8
mov eax, dword [esp + 0x1c]
push eax
call fcn.0041288e
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00412899
add esp, 0x30
ret
Function at 0x40e120
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x108
mov eax, dword [0x42b1d0]
xor eax, esp
mov dword [esp + 0x104], eax
push ebp
mov ebp, dword [esp + 0x110]
push esi
push edi
push 0x104
lea eax, [esp + 0x10]
push 0
push eax
mov edi, ecx
mov esi, edx
call fcn.004183e0
add esp, 0xc
push edi
push 0x104
lea ecx, [esp + 0x14]
push ecx
push str.This_value_is_not_found
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0xc]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40e175
sub eax, ecx
push eax
lea edx, [esp + 0x10]
push edx
mov ecx, esi
call fcn.00401c30
mov edi, dword [esi + 0x14]
mov eax, edi
cmp edi, 0x17
jb 0x40e19a
mov eax, 0x17
cmp dword [esi + 0x18], 0x10
jb 0x40e1a5
mov esi, dword [esi + 4]
jmp 0x40e1a8
add esi, 4
mov ecx, str.This_value_is_not_found
mov edx, esi
call fcn.00401040
test eax, eax
jne 0x40e1c7
cmp edi, 0x17
jb 0x40e1c7
cmp edi, 0x17
setne al
test eax, eax
je 0x40e1cc
mov eax, 1
mov ecx, dword [esp + 0x110]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00412899
add esp, 0x108
ret 4
Function at 0x40e9b0
Capabilities:
Terminate thread

Disassembly:
cmp byte [esi + 0x18], 0
je 0x40e9c2
mov eax, dword [esi + 0x14]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [esi + 0x10], 0
jne 0x40e9de
cmp byte [esi + 0x18], 0
je 0x40e9d8
mov ecx, dword [esi + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, 0xfffffffc
ret
mov edx, dword [esi + 4]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov byte [esi + 0x10], 0
cmp byte [esi + 0x18], 0
je 0x40e9fe
mov eax, dword [esi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor eax, eax
ret

Function at 0x40eeb0
Capabilities:
Query service configuration

Disassembly:
push ecx
cmp dword [edi + 4], 0
push esi
jne 0x40eef5
cmp dword [0x42c154], 0x10
mov eax, dword [0x42c140]
jae 0x40eecb
mov eax, 0x42c140
push 0x10020
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [edi + 4], eax
test eax, eax
jne 0x40eef5
push str.Couldnt_open_service
call fcn.00412560
add esp, 4
xor al, al
pop esi
pop ecx
ret 4
push 0x1000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x40ef1c
push str.Allocate_failed.
call fcn.00412560
add esp, 4
xor al, al
pop esi
pop ecx
ret 4
mov edx, dword [edi + 4]
lea ecx, [esp + 4]
push ecx
push 0x1000
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x40ef50
push str.QueryServiceConfig_failed.
call fcn.00412560
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
pop esi
pop ecx
ret 4
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0xc]
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push str.QueryServiceConfig_successfully.
call fcn.004124a0
add esp, 4
mov al, 1
pop esi
pop ecx
ret 4
Function at 0x40f310
Capabilities:
Delete service
Stop service

Disassembly:
mov eax, dword [esi]
sub esp, 0x20
push ebx
push edi
xor edi, edi
test eax, eax
jne 0x40f32c
push str.Couldnt_open_service_manager
call fcn.00412560
jmp 0x40f41e
cmp dword [esi + 4], edi
jne 0x40f368
cmp dword [0x42c154], 0x10
mov ecx, dword [0x42c140]
jae 0x40f345
mov ecx, 0x42c140
push 0xf01ff
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [esi + 4], eax
test eax, eax
jne 0x40f368
push str.Couldnt_open_service
call fcn.00412560
jmp 0x40f41e
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esi + 4]
mov ebx, dword [sym.imp.ADVAPI32.dll_ControlService]
lea eax, [esp + 0xc]
push eax
push 4
push ecx
call ebx
test eax, eax
mov eax, dword [esp + 0x10]
je 0x40f3f3
cmp eax, 4
jne 0x40f3f3
push str.Service_state_is_SERVICE_RUNNING.
call fcn.004124a0
mov eax, dword [esi + 4]
add esp, 4
lea edx, [esp + 0xc]
push edx
push 1
push eax
call ebx
test eax, eax
jne 0x40f3c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unInstall_Service_Error.Error_Code:_d.
call fcn.00412560
add esp, 8
jmp 0x40f421
cmp byte [esp + 0x2c], 0
je 0x40f3e7
mov ecx, dword [esi + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov edi, eax
test edi, edi
je 0x40f40b
push str.Uninstall_service_successfully.
call fcn.004124a0
jmp 0x40f41e
push str.Close_Service
call fcn.004124a0
jmp 0x40f41e
cmp eax, 1
jne 0x40f40f
push str.Service_state_is_SERVICE_STOPPED.
call fcn.004124a0
mov edx, dword [esi + 4]
add esp, 4
push edx
jmp 0x40f3cf
xor edi, edi
jmp 0x40f421
push str.Service_state_isnt_SERVICE_RUNNING_or_SERVICE_STOPPED_it_is_other_state_.we_dont_delete_it
call fcn.004124a0
mov edi, 1
add esp, 4
mov eax, dword [esi + 4]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x40f438
push eax
call ebx
mov dword [esi + 4], 0
mov eax, dword [esi]
test eax, eax
je 0x40f447
push eax
call ebx
mov dword [esi], 0
mov eax, edi
pop edi
pop ebx
add esp, 0x20
ret 4
Function at 0x40f8a0
Capabilities:
Modify service

Disassembly:
sub esp, 8
cmp dword [edi + 4], 0
push ebx
push ebp
push esi
je 0x40f9d0
mov eax, dword [edi]
test eax, eax
je 0x40f9d0
push eax
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov ebp, eax
test ebp, ebp
jne 0x40f95e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x41f
je 0x40f8e5
push str.LockServiceDatabase_fail
call fcn.00412560
add esp, 4
push 0x10c
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x40f905
push str.LocalAlloc_is_fail
call fcn.00412560
add esp, 4
mov ecx, dword [edi]
lea eax, [esp + 0x10]
push eax
push 0x10c
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceLockStatusA]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
jne 0x40f9ad
push str.QueryServiceLockStatus
call fcn.004124a0
add esp, 4
test esi, esi
je 0x40f93d
push esi
call ebx
xor esi, esi
push str.No_longer_locked_n
call fcn.004124a0
add esp, 4
test esi, esi
je 0x40f951
push esi
call ebx
push str.Could_not_lock_database
call fcn.004124a0
add esp, 4
mov ecx, dword [edi + 4]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push ecx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test eax, eax
jne 0x40f98d
push str.ChangeServiceConfig_fail
call fcn.00412560
add esp, 4
push str.ChangeServiceConfig_SUCCESS_n
call fcn.004124a0
add esp, 4
push ebp
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov eax, 1
pop esi
pop ebp
pop ebx
add esp, 8
ret
test esi, esi
je 0x40f93d
cmp dword [esi], 0
je 0x40f93d
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push eax
push str.Locked_by:__s__duration:__d_seconds_n
call fcn.004124a0
add esp, 0xc
jmp 0x40f94a
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
Function at 0x40f9e0
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
sub esp, 0x20
push ebx
xor eax, eax
push ebp
mov ebp, dword [esp + 0x2c]
mov ecx, dword [ebp + 4]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x14]
push eax
xor ebx, ebx
push ecx
mov dword [esp + 0x3c], ebx
call esi
test eax, eax
jne 0x40fa3d
push str.Query_Services_status_fail
call fcn.00412560
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
cmp dword [esp + 0x18], 4
jne 0x40fa5d
push str.Service_has_been_started
call fcn.004124a0
add esp, 4
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp + 4]
push ebx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40faa9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x42c154], 0x10
mov ecx, dword [0x42c140]
jae 0x40fa8e
mov ecx, 0x42c140
push eax
push ecx
push str.error_happens_during_starting_a_service:__s_Error_Code:_d
call fcn.00412560
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x14]
push eax
push ecx
call esi
test eax, eax
je 0x40fa24
cmp dword [esp + 0x18], 2
jne 0x40fb4b
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ecx, [ecx]
mov eax, 0xcccccccd
mul dword [esp + 0x2c]
mov esi, edx
shr esi, 3
cmp esi, 0x3e8
jae 0x40faed
mov esi, 0x3e8
jmp 0x40fafa
cmp esi, 0x2710
jbe 0x40fafa
mov esi, 0x2710
push esi
push str.ChangeSrvStatusToRuning_sleep_:_d
call fcn.004124a0
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 4]
lea edx, [esp + 0x14]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40fb4b
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x28], ecx
jbe 0x40fb3a
call edi
mov edx, dword [esp + 0x28]
mov ebx, eax
mov dword [esp + 0x34], edx
jmp 0x40fb44
call edi
sub eax, ebx
cmp eax, dword [esp + 0x2c]
ja 0x40fb4b
cmp dword [esp + 0x18], 2
je 0x40fad0
cmp dword [esp + 0x18], 4
jne 0x40fb6b
push str.StartService_SUCCESS.
call fcn.004124a0
add esp, 4
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
push str.StartService_fail._n
call fcn.00412560
add esp, 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x20
ret 4
Function at 0x40fb90
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x84
mov eax, dword [0x42b1d0]
xor eax, esp
mov dword [esp + 0x80], eax
push esi
push edi
push 0x80
lea eax, [esp + 0xc]
push 0
push eax
mov edi, ecx
mov esi, edx
call fcn.004183e0
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
push 0x80
lea ecx, [esp + 0x10]
push ecx
push str.This_value_is_not_found
push ebx
push str.INSTALL
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x40fbfa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetPrivateProfileString_failed_Error_Code:_d
call fcn.00412560
add esp, 8
lea eax, [esp + 8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40fc01
sub eax, edx
push eax
lea edx, [esp + 0xc]
push edx
mov ecx, esi
call fcn.00401c30
mov edi, dword [esi + 0x14]
mov eax, edi
cmp edi, 0x17
jb 0x40fc26
mov eax, 0x17
cmp dword [esi + 0x18], 0x10
jb 0x40fc31
mov esi, dword [esi + 4]
jmp 0x40fc34
add esi, 4
mov ecx, str.This_value_is_not_found
mov edx, esi
call fcn.00401040
test eax, eax
jne 0x40fc6a
cmp edi, 0x17
jb 0x40fc6a
cmp edi, 0x17
setne al
test eax, eax
jne 0x40fc6a
pop edi
pop esi
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.00412899
add esp, 0x84
ret
mov ecx, dword [esp + 0x88]
pop edi
pop esi
xor ecx, esp
mov eax, 1
call fcn.00412899
add esp, 0x84
ret

Function at 0x410190
Capabilities:
Check os version

Disassembly:
push esi
push edi
push 0x11c
call fcn.00412dc7
push 0x11c
mov edi, eax
push 0
push edi
call fcn.004183e0
add esp, 0x10
push edi
mov dword [edi], 0x11c
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x410291
mov eax, dword [edi + 4]
cmp eax, 5
jne 0x410287
cmp dword [edi + 8], esi
je 0x410287
lea esi, [edi + 0x14]
mov ecx, str.Service_Pack_3
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41020a
test dx, dx
je 0x410206
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41020a
add eax, 4
add ecx, 4
test dx, dx
jne 0x4101e4
xor eax, eax
jmp 0x41020f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x410224
push edi
lea esi, [eax + 3]
call fcn.00412cea
add esp, 4
pop edi
mov eax, esi
pop esi
ret
mov ecx, str.Service_Pack_2
mov eax, esi
jmp 0x410230
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41026b
test dx, dx
je 0x410252
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41026b
add eax, 4
add ecx, 4
test dx, dx
jne 0x410230
xor eax, eax
neg eax
sbb eax, eax
add eax, 2
push edi
mov esi, eax
call fcn.00412cea
add esp, 4
pop edi
mov eax, esi
pop esi
ret
sbb eax, eax
sbb eax, 0xffffffff
neg eax
sbb eax, eax
add eax, 2
push edi
mov esi, eax
call fcn.00412cea
add esp, 4
pop edi
mov eax, esi
pop esi
ret
cmp eax, 6
jb 0x410291
mov esi, 4
push edi
call fcn.00412cea
add esp, 4
pop edi
mov eax, esi
pop esi
ret