joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401000
Capabilities:
Delete registry key
Delete registry value
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x214
mov al, byte [0x43685c]
push esi
test al, al
mov dword [esp + 0xc], 0
je 0x40111b
lea eax, [esp + 4]
push eax
push str.SystemCurrentControlSetServicesDbgv
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40103f
xor al, al
pop esi
add esp, 0x214
ret
mov ecx, dword [esp + 4]
push edi
push str.DeleteFlag
push ecx
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov eax, dword [esp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [esp + 0x10]
push 4
push edx
push 4
push 0
push 0x41d098
push eax
call esi
mov ecx, dword [esp + 8]
push 0x14
push str.System_Bus_Extender
push 1
push 0
push str.Group
push ecx
call esi
mov eax, dword [esp + 8]
lea edx, [esp + 0xc]
push 4
push edx
push 4
push 0
push 0x41d08c
push eax
mov dword [esp + 0x24], 1
call esi
mov edx, dword [esp + 8]
lea ecx, [esp + 0xc]
push 4
push ecx
push 4
push 0
push 0x41d084
push edx
call esi
push 0x41d078
lea eax, [esp + 0x11c]
push str.System32Drivers_s
push eax
call fcn.00410876
lea edi, [esp + 0x124]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
mov edx, dword [esp + 8]
dec ecx
push ecx
lea ecx, [esp + 0x11c]
push ecx
push 2
push eax
push 0x41d058
push edx
call esi
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov al, 1
pop esi
add esp, 0x214
ret
push str.SystemCurrentControlSetServicesDbgv
lea ecx, [esp + 0x14]
push 0x41d050
push ecx
call fcn.00410876
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
add esp, 0xc
lea edx, [esp + 0x10]
push edx
push reloc.WS2_32.dll_bind
call esi
push str.SystemCurrentControlSetServicesDbgv
lea eax, [esp + 0x14]
push 0x41d044
push eax
call fcn.00410876
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
push reloc.WS2_32.dll_bind
call esi
push str.SystemCurrentControlSetServicesDbgv
push reloc.WS2_32.dll_bind
call esi
mov al, 1
pop esi
add esp, 0x214
ret
Function at 0x401180
Capabilities:
Delete file
Query environment variable

Disassembly:
mov al, byte [0x43685c]
sub esp, 0x208
test al, al
push esi
lea ecx, [esp + 0x108]
push 0x104
push ecx
sete al
push str.SYSTEMROOT
mov byte [0x43685c], al
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x4011e9
push edi
mov ecx, 0xc
mov esi, str.Could_not_resolve_SYSTEMROOT_environment_variable
mov edi, 0x435820
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x214]
push 0x10
push 0x41d1a4
push 0x435820
push edx
movsw word es:[edi], word [esi]
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
add esp, 0x208
ret
lea eax, [esp + 0x108]
push 0x41d078
push eax
lea ecx, [esp + 0xc]
push str._sSystem32Drivers_s
push ecx
call fcn.00410876
mov al, byte [0x43685c]
mov esi, dword [esp + 0x220]
add esp, 0x10
test al, al
je 0x4012ba
lea edx, [esp + 4]
push edx
push str.RCDBGSYS
call fcn.00409fc0
add esp, 8
test al, al
jne 0x401256
push 0x10
push 0x41d1a4
mov eax, esi
push str.Could_not_install_DebugView_driver.
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [0x43685c], 0
pop esi
add esp, 0x208
ret
call fcn.00401000
test al, al
jne 0x401293
mov ecx, dword [esp + 0x210]
push 0x10
push 0x41d1a4
push str.Could_not_configure_DebugView_boot_log_Registry_key.
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
lea edx, [esp + 4]
mov byte [0x43685c], 0
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop esi
add esp, 0x208
ret
push str.DebugView_has_been_configured_to_buffer_kernel_debug_output_at_the_next_boot.
push 0x435820
call fcn.00410876
add esp, 8
push 0x40
push 0x41d1a4
push 0x435820
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4012ca
call fcn.00401000
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov cl, byte [0x43685c]
neg cl
sbb ecx, ecx
and ecx, 8
push ecx
push 0x9c78
push esi
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_CheckMenuItem]
pop esi
add esp, 0x208
ret
Function at 0x401300
Capabilities:
Query or enumerate registry value

Disassembly:
mov al, byte [0x42d8e4]
sub esp, 0x3c
test al, al
je 0x401431
push ebx
push ebp
push esi
mov esi, dword [esp + 0x4c]
lea eax, [esp + 0x18]
push edi
mov edi, dword [sym.imp.USER32.dll_GetMenu]
push eax
push 1
push 2
push esi
mov dword [esp + 0x2c], 0x30
mov dword [esp + 0x30], 0x10
mov dword [esp + 0x34], 0x800
call edi
mov ebx, dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call ebx
mov ebp, dword [sym.imp.USER32.dll_GetMenuItemCount]
push eax
call ebp
push eax
push 2
push esi
call edi
push eax
call ebx
push eax
call dword [sym.imp.USER32.dll_InsertMenuItemA]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], 0x12
push ecx
push 1
push 2
push esi
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], 0x9c78
mov dword [esp + 0x50], str.Log_Boot
call edi
push eax
call ebx
push eax
call ebp
push eax
push 2
push esi
call edi
push eax
call ebx
push eax
call dword [sym.imp.USER32.dll_InsertMenuItemA]
lea edx, [esp + 0x50]
mov ebx, 3
push edx
push str.SystemCurrentControlSetServicesDbgv
push reloc.WS2_32.dll_bind
mov dword [esp + 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4013fc
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x1c]
push ecx
push edx
push 0
push 0x41d098
push eax
mov dword [esp + 0x2c], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x50]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x10], ebx
setne al
test al, al
mov byte [0x43685c], al
jne 0x401416
call fcn.00401000
mov al, byte [0x43685c]
neg al
sbb eax, eax
and eax, 8
push eax
push 0x9c78
push esi
call edi
push eax
call dword [sym.imp.USER32.dll_CheckMenuItem]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret

Function at 0x401ba0
Capabilities:
Get graphical window text
Hide graphical window

Disassembly:
mov eax, 0x1000
call fcn.00410aa0
mov al, byte [0x41d55c]
test al, al
mov eax, 0x41d76c
jne 0x401bbd
mov eax, str.APPICONDISABLED
push esi
push edi
push eax
mov eax, dword [0x433270]
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
mov esi, dword [esp + 0x100c]
lea ecx, [esp + 8]
push 0x1000
push ecx
push esi
mov edi, eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea edx, [esp + 8]
push edx
push edi
push 1
push esi
call fcn.00401ae0
add esp, 0x10
push 0
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
pop edi
pop esi
add esp, 0x1000
ret
Function at 0x403b40
Capabilities:
Hide graphical window

Disassembly:
mov eax, dword [0x4247f4]
mov ecx, dword [0x4357f0]
push ebx
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_GetSubMenu]
add eax, 0xc350
push 0
push eax
push 4
push ecx
call edi
mov ebx, dword [sym.imp.USER32.dll_CheckMenuItem]
push eax
call ebx
mov esi, dword [esp + 0x14]
mov eax, dword [0x4357f0]
push 8
lea edx, [esi + 0xc350]
push edx
push 4
push eax
call edi
push eax
call ebx
mov eax, dword [0x4247f4]
mov ebx, dword [sym.imp.USER32.dll_ShowWindow]
push 0
lea ecx, [eax + eax*4]
lea edx, [eax + ecx*2]
shl edx, 5
mov eax, dword [edx + 0x431624]
push eax
call ebx
lea ecx, [esi + esi*4]
push 5
lea edx, [esi + ecx*2]
shl edx, 5
mov eax, dword [edx + 0x431624]
lea edi, [edx + 0x431624]
push eax
call ebx
mov ecx, dword [0x4247f4]
mov ebx, dword [esp + 0x10]
push esi
push ecx
push ebx
call fcn.004031d0
push esi
push ebx
call fcn.00401830
mov edx, dword [edi]
add esp, 0x14
test esi, esi
mov dword [0x4247f4], esi
mov dword [0x4313b0], edx
jne 0x403bf8
mov al, byte [0x41d54c]
test al, al
jne 0x403bf8
push 1
jmp 0x403bfa
push 0
push 0x9c63
push ebx
call dword [sym.imp.USER32.dll_GetMenu]
mov esi, dword [sym.imp.USER32.dll_EnableMenuItem]
push eax
call esi
mov eax, dword [0x4247f4]
test eax, eax
jne 0x403c25
mov al, byte [0x41d54c]
test al, al
je 0x403c25
xor eax, eax
jmp 0x403c2a
mov eax, 1
push eax
mov eax, dword [0x4357f0]
push 0x9c78
push eax
call esi
mov ecx, dword [0x4313b0]
push ecx
call dword [sym.imp.USER32.dll_SetFocus]
pop edi
pop esi
pop ebx
ret

Function at 0x403cb0
Capabilities:
Connect socket

Disassembly:
push ecx
push ebx
push esi
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push edi
push 0x10
lea eax, [esi + esi*4]
push ecx
lea edi, [esi + eax*2]
shl edi, 5
mov edx, dword [edi + 0x431730]
push edx
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x403cf1
call sub.WS2_32.dll_WSAGetLastError
sub eax, 0x274c
pop edi
neg eax
sbb eax, eax
pop esi
and al, 0xf9
pop ebx
add eax, 8
pop ecx
ret
mov ebx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x20]
push 1
push eax
lea ecx, [esp + 0x24]
push 4
push ecx
push esi
push ebx
mov dword [esp + 0x34], 0x83050024
call fcn.0040fe50
add esp, 0x1c
test al, al
je 0x403d83
push 0x7d0
lea edx, [esp + 0x20]
push 1
push edx
lea eax, [esp + 0x18]
push 4
push eax
push esi
push ebx
call fcn.00410010
add esp, 0x1c
test al, al
je 0x403d83
mov eax, dword [esp + 0xc]
mov byte [edi + 0x431623], 0
cmp eax, 0x7fffffff
jne 0x403d69
mov byte [edi + 0x431623], 1
shr eax, 0x1f
not al
and al, 1
mov byte [edi + 0x431621], al
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret
mov ecx, eax
and ecx, 0x7fffffff
cmp ecx, 0x320
je 0x403d55
pop edi
pop esi
mov eax, 2
pop ebx
pop ecx
ret
call sub.WS2_32.dll_WSAGetLastError
pop edi
pop esi
mov eax, 7
pop ebx
pop ecx
ret
Function at 0x404180
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x1c]
lea eax, [ebx + ebx*4]
push esi
push edi
mov edi, 0x7e4
lea esi, [ebx + eax*2]
shl esi, 5
push 0
push 1
push 2
call sub.WS2_32.dll_socket
xor ecx, ecx
mov dword [esi + 0x431730], eax
mov edx, dword [esi + 0x43172c]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
push edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], ecx
mov word [esp + 0x14], 2
call sub.WS2_32.dll_htons
mov word [esp + 0x12], ax
lea eax, [esp + 0x10]
push eax
push ebx
push ebp
call fcn.00403cb0
add esp, 0xc
test eax, eax
je 0x404240
cmp eax, 2
je 0x40424a
cmp eax, 1
je 0x40421b
cmp eax, 8
je 0x404263
mov ecx, dword [esi + 0x431730]
push ecx
call sub.WS2_32.dll_closesocket
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esi + 0x431730], eax
mov edx, dword [esi + 0x431730]
push edx
call sub.WS2_32.dll_closesocket
inc edi
cmp di, 0x7ee
jl 0x40419d
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
mov eax, dword [esi + 0x431730]
push eax
call sub.WS2_32.dll_closesocket
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
mov eax, 8
pop ebx
add esp, 0x10
ret
Function at 0x405490
Capabilities:
Get common file path

Disassembly:
sub esp, 0x28
lea eax, [esp]
push ebx
push esi
push edi
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov eax, dword [esp + 0xc]
push 0x104
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov ebx, eax
xor edi, edi
cmp ebx, edi
je 0x4055ae
mov esi, dword [esp + 0x38]
lea edx, [esp + 0x10]
push edx
push 0x12
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x4055a3
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], str.Select_Remote_Computer
mov dword [esp + 0x28], 0x1000
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderA]
mov edx, eax
cmp edx, edi
je 0x405594
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
push ebp
repne scasb al, byte es:[edi]
mov ebp, dword [esp + 0x40]
push edx
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
mov eax, dword [esp + 0x10]
push ebx
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
push 0x4313e0
push ebp
call fcn.00419410
add esp, 8
test eax, eax
pop ebp
jne 0x40558b
push 0x10
push 0x41d1a4
push str.The_local_computer_cannot_be_selected_for_remote_monitoring.
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x28
ret
pop edi
pop esi
mov al, 1
pop ebx
add esp, 0x28
ret
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [esp + 0xc]
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x28
ret
Function at 0x408340
Capabilities:
Get graphical window text
Hide graphical window

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x43688c]
mov edx, dword [0x436888]
push 0
mov dword [0x433270], eax
push eax
mov eax, dword [0x436890]
push 0
push 0
push eax
mov eax, dword [0x436884]
push ecx
push edx
push eax
push 0xcf0000
push 0x425850
push str.dbgviewClass
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
test eax, eax
mov dword [0x42fd24], eax
jne 0x40838b
ret
push 0
push eax
call fcn.00401830
mov al, byte [0x4247cd]
add esp, 8
test al, al
je 0x4083a3
xor eax, eax
jmp 0x4083a7
mov eax, dword [esp + 8]
mov ecx, dword [0x42fd24]
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_ShowWindow]
push eax
push ecx
call edi
mov edx, dword [0x42fd24]
push edx
call dword [sym.imp.USER32.dll_UpdateWindow]
mov al, byte [0x41d55e]
mov ecx, dword [0x432624]
neg al
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
sbb eax, eax
add eax, 0xa
push eax
push 0x9c5a
push 0x42b
push ecx
call esi
mov dl, byte [0x41d561]
mov eax, dword [0x432624]
neg dl
sbb edx, edx
add edx, 0x12
push edx
push 0x9c5f
push 0x42b
push eax
call esi
mov cl, byte [0x41d55f]
mov edx, dword [0x432624]
neg cl
sbb ecx, ecx
add ecx, 0xd
push ecx
push 0x9c5c
push 0x42b
push edx
call esi
mov al, byte [0x41d563]
mov ecx, dword [0x432624]
neg al
sbb eax, eax
add eax, 0xf
push eax
push 0x9c5d
push 0x42b
push ecx
call esi
mov edx, dword [0x432624]
push 1
push 0
push edx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov al, byte [0x4368a5]
test al, al
je 0x408471
mov eax, dword [0x42fd24]
push 3
push eax
call edi
mov al, byte [0x4247d0]
pop edi
test al, al
pop esi
je 0x4084b4
mov ecx, dword [0x42fd24]
push 3
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push ecx
call dword [sym.imp.USER32.dll_SetWindowPos]
mov dl, byte [0x4247d0]
mov eax, dword [0x4357f0]
neg dl
sbb edx, edx
and edx, 8
push edx
push 0x9c61
push eax
call dword [sym.imp.USER32.dll_CheckMenuItem]
mov eax, dword [0x42fd24]
ret
Function at 0x408c90
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
push ebp
push esi
push edi
xor edi, edi
test eax, eax
jbe 0x408d24
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
mov eax, dword [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [esp + 0x1c]
sub eax, edi
cmp eax, 0x1f4
jb 0x408cca
mov eax, 0x1f4
lea ecx, [esp + 0x20]
push esi
push ecx
lea edx, [edi + ebp]
push eax
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test al, al
jne 0x408d16
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x408d2b
mov eax, dword [esi + 0x10]
push 0xbb8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x408d2b
lea ecx, [esp + 0x20]
push 1
push ecx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test al, al
je 0x408d2b
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
add edi, ecx
cmp edi, eax
jb 0x408cae
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
ret
pop edi
pop esi
pop ebp
xor al, al
pop ebx
ret

Function at 0x409fc0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
push edi
push str.BINRES
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x409fe1
pop edi
pop esi
xor al, al
pop ebx
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [esp + 0x14]
push 0x41ecf8
push ecx
mov edi, eax
call fcn.00410f45
mov esi, eax
add esp, 8
test esi, esi
jne 0x40a01e
pop edi
pop esi
xor al, al
pop ebx
ret
push esi
push ebx
push 1
push edi
call fcn.00411337
push esi
call fcn.00410d80
add esp, 0x14
mov al, 1
pop edi
pop esi
pop ebx
ret
Function at 0x40bb70
Capabilities:
Create service

Disassembly:
mov eax, dword [esp + 0xc]
push 0
push 0
push 0
mov ecx, dword [esp + 0x10]
push 0
push 0
push eax
mov eax, dword [esp + 0x20]
push 1
push 3
push 0x10
push 0xf01ff
push eax
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
jne 0x40bba0
ret
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
ret

Function at 0x40bbb0
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
sub esp, 0x1c
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
mov ebx, eax
mov eax, dword [0x42a0e0]
test eax, eax
je 0x40bbcf
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push 0xf01ff
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
test eax, eax
mov dword [0x42a0e0], eax
jne 0x40bbf3
pop edi
pop ebx
add esp, 0x1c
ret
push ebp
push esi
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40bc11
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x40bc51
mov ebp, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov esi, 1
mov eax, dword [0x42a0e0]
lea edx, [esp + 0x10]
push edx
push eax
call ebp
test eax, eax
je 0x40bc51
mov eax, dword [esp + 0x14]
cmp eax, 4
je 0x40bc53
cmp eax, 1
je 0x40bc51
call edi
sub eax, ebx
cmp eax, 0xea60
jbe 0x40bc1c
push 0x41d
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
mov ecx, dword [0x42a0e0]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop esi
pop ebp
pop edi
mov dword [0x42a0e0], 0
pop ebx
add esp, 0x1c
ret

Function at 0x40bc80
Capabilities:
Query service status
Stop service

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
sub esp, 0x1c
push esi
push 0xf01ff
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x40bca4
pop esi
add esp, 0x1c
ret
push ebx
lea edx, [esp + 8]
push edi
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov ebx, eax
lea eax, [esp + 0xc]
push eax
push esi
call edi
test eax, eax
je 0x40bcdb
cmp dword [esp + 0x10], 1
je 0x40bcdb
lea ecx, [esp + 0xc]
push ecx
push esi
call edi
test eax, eax
jne 0x40bcc8
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
pop edi
pop ebx
pop esi
add esp, 0x1c
ret
Function at 0x40fe50
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 0x14
call fcn.00410bb8
mov ebp, eax
xor eax, eax
mov ecx, ebp
add esp, 4
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
push eax
push eax
push 1
push eax
mov dword [ecx + 0x10], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
mov dword [ebp + 0x10], eax
mov al, byte [esp + 0x28]
test al, al
je 0x40feb4
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
lea edx, [edi + edi*4]
push ebp
push ebx
push eax
lea esi, [edi + edx*2]
push ecx
shl esi, 5
mov edx, dword [esi + 0x431730]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40feda
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
lea eax, [edi + edi*4]
push 0x40fe30
push ebp
push ecx
lea esi, [edi + eax*2]
push edx
shl esi, 5
mov eax, dword [esi + 0x431730]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFileEx]
test al, al
mov byte [esp + 0x18], al
jne 0x40ffdb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40ff1c
mov al, byte [esp + 0x28]
test al, al
je 0x40ffff
mov ecx, dword [esi + 0x431730]
push 1
push ebx
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test al, al
mov byte [esp + 0x18], al
jne 0x40ffdb
mov al, byte [esi + 0x431622]
test al, al
jne 0x40ffdb
lea edx, [esi + 0x431628]
mov byte [esi + 0x431622], 1
push edx
push str.The_connection_with__s_was_broken
push 0x435820
call fcn.00410876
mov eax, dword [0x4247f4]
mov esi, dword [esp + 0x20]
add esp, 0xc
cmp eax, edi
jne 0x40ff7a
push edi
push esi
call fcn.00401830
mov eax, dword [0x4247f4]
add esp, 8
cmp edi, eax
jne 0x40ff7a
mov eax, dword [0x42fd24]
push edi
push edi
push eax
call fcn.004031d0
add esp, 0xc
mov bl, byte [esp + 0x2c]
test bl, bl
je 0x40ff8d
push 0x432640
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x30
push 0x41d1a4
push 0x435820
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [0x4313a8]
mov edx, dword [0x4357fc]
mov eax, dword [0x4357f0]
push ecx
push edx
add edi, 0xc350
push 0
push edi
push 4
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call dword [sym.imp.USER32.dll_SetMenuItemBitmaps]
test bl, bl
je 0x40ffdb
push 0x432640
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x28]
test al, al
je 0x40fff6
push ebp
call fcn.00410acf
add esp, 4
mov al, byte [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor al, al
pop ebx
ret