joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4026da
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
and dword [ebp - 4], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
push edi
xor edi, edi
cmp dword [ebp - 4], edi
jne 0x40270b
push 0x104
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x402726
cmp dword [ebp - 4], 1
jne 0x402759
lea eax, [ebp - 0x114]
push eax
push edi
push edi
push 0x801a
push edi
call dword [sym.imp.SHFOLDER.dll_SHGetFolderPathA]
lea eax, [ebp - 0x114]
mov esi, eax
push eax
dec esi
call ebx
cmp byte [eax + esi], 0x5c
jne 0x402747
lea eax, [ebp - 0x114]
push eax
call ebx
cmp byte [eax + esi], 0x2f
je 0x402759
lea eax, [ebp - 0x114]
push 0x40489c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [ebp - 4]
neg eax
sbb eax, eax
and eax, 0xffffffe9
add eax, 0x18
push eax
call fcn.00402132
cmp dword [ebp - 4], edi
pop ecx
mov esi, eax
jne 0x402892
shl eax, 6
lea edi, [eax + section..data]
push edi
call ebx
test eax, eax
je 0x4027dd
push 0x40498c
push edi
mov byte [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x4027a0
mov byte [ebp - 0x10], 1
push edi
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp - 0x10]
lea eax, [ebp - 0x114]
push dword [ebp + 8]
push eax
call fcn.004024d5
add esp, 0xc
test al, al
jne 0x402892
mov byte [edi], al
jmp 0x4026f0
push edi
call ebx
test eax, eax
jne 0x4027e2
inc esi
add edi, 0x40
cmp esi, 0x18
jb 0x4027d2
cmp esi, 0x18
jne 0x40285e
xor esi, esi
mov edi, section..data
push edi
call ebx
test eax, eax
jne 0x4027fe
inc esi
add edi, 0x40
cmp esi, 0x18
jb 0x4027ee
cmp esi, 0x18
jne 0x40280f
mov dword [ebp - 4], 1
jmp 0x4026f0
shl esi, 6
push 0x40498c
lea esi, [esi + section..data]
push esi
mov byte [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x402830
mov byte [ebp - 8], 1
push esi
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp - 8]
push dword [ebp + 8]
lea eax, [ebp - 0x114]
push eax
call fcn.004024d5
add esp, 0xc
test al, al
jne 0x402892
mov byte [esi], al
jmp 0x4026f0
shl esi, 6
push 0x40498c
lea esi, [esi + section..data]
push esi
mov byte [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x40287f
mov byte [ebp - 0xc], 1
push esi
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp - 0xc]
jmp 0x402841
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402897
Capabilities:
Connect to http server
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push ebx
push 0x50
push 0x406a58
push dword [0x407c18]
mov byte [ebp - 1], bl
call dword [sym.imp.WININET.dll_InternetConnectA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x4029a6
push edi
push ebx
push 0x4200100
push ebx
push ebx
push str.HTTP_1.1
push 0x406950
push 0x4049b4
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
cmp edi, ebx
je 0x40299c
push dword [0x407c2c]
lea eax, [ebp - 0x110]
push str.C_Version:__i
push eax
mov dword [ebp - 8], 0x104
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x20000000
push 0xffffffffffffffff
lea eax, [ebp - 0x110]
push eax
push edi
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
push ebx
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
cmp eax, 1
jne 0x402995
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.C_ClientStatus
lea eax, [ebp - 0x110]
push eax
call esi
push ebx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x110]
push eax
push 0xffff
push edi
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
cmp eax, 1
jne 0x402994
push 0x404990
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x402994
lea eax, [ebp - 0x110]
push eax
push 0x406640
call esi
mov byte [ebp - 1], 1
pop esi
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0xc]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
mov al, byte [ebp - 1]
pop ebx
leave
ret

Function at 0x4029ac
Capabilities:
Connect to http server
Send data
Send http request

Disassembly:
sub esp, 0x404
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push edi
push 0x50
push 0x406a58
push dword [0x407c18]
call dword [sym.imp.WININET.dll_InternetConnectA]
cmp eax, edi
mov dword [esp + 4], eax
je 0x402a71
push esi
push edi
push 0x4200100
push edi
push edi
push str.HTTP_1.1
push 0x406770
push 0x4049b4
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, eax
cmp esi, edi
je 0x402a66
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push ebx
push ebp
push 0x406950
lea eax, [esp + 0x18]
push str.C_OldUID:__s
push eax
call edi
mov ebx, dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
add esp, 0xc
mov ebp, 0x20000000
push ebp
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
push eax
push esi
call ebx
push 0x406640
lea eax, [esp + 0x18]
push str.C_Status:__s
push eax
call edi
add esp, 0xc
push ebp
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
push eax
push esi
call ebx
xor eax, eax
push eax
push eax
push eax
push eax
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop ebp
pop ebx
push dword [esp + 8]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop esi
pop edi
add esp, 0x404
ret
Function at 0x402a79
Capabilities:
Delete file
Download url
Get common file path
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb38
push ebx
push esi
push edi
lea eax, [ebp - 0xb38]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0xb38]
push eax
call edi
push dword [ebp + 8]
or dword [ebp - 8], 0xffffffff
lea ecx, [ebp - 0xa34]
xor ebx, ebx
sub ecx, 0x105
mov byte [eax + ecx], bl
mov eax, dword [ebp + 0xc]
mov byte [eax], bl
mov dword [ebp - 4], ebx
call edi
test eax, eax
jle 0x402ae8
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
cmp byte [eax + ecx], 0x2f
jne 0x402adc
mov dword [ebp - 8], eax
inc eax
push ecx
mov dword [ebp - 4], eax
call edi
cmp dword [ebp - 4], eax
jl 0x402acd
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
add eax, ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0xb38]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], eax
push esi
push dword [ebp - 4]
lea eax, [ebp - 0x110]
push eax
call edi
push dword [ebp - 8]
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
push 0x80
push 1
push ebx
push ebx
push 0x1f01ff
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x402b51
inc dword [ebp - 0xc]
add dword [ebp - 4], esi
cmp dword [ebp - 0xc], 1
jl 0x402b05
jmp 0x402b65
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
push ebx
lea eax, [ebp - 0x110]
push eax
push dword [ebp + 8]
push ebx
call sub.urlmon.dll_URLDownloadToFileA
test eax, eax
jl 0x402b97
lea eax, [ebp - 0x110]
push eax
push ebx
call fcn.00401397
pop ecx
pop ecx
push esi
lea eax, [ebp - 0x110]
push eax
push dword [ebp + 0xc]
call edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402b9c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
push 0x104
lea eax, [ebp - 0x130]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x402c3c
push ebx
push esi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402c3a
push esi
push esi
push 0x4e
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 4]
push eax
push 0x27
lea eax, [ebp - 0x2c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402c33
cmp dword [ebp - 4], 0x27
jne 0x402c33
push edi
lea esi, [ebp - 0x2c]
mov edi, 0x406940
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea esi, [ebp - 0x1f]
mov edi, 0x407228
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea esi, [ebp - 0x12]
mov edi, 0x407a08
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebx
xor eax, eax
inc eax
leave
ret
Function at 0x402d26
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x504
push ebx
push esi
push edi
xor edi, edi
push edi
lea eax, [ebp - 0x10]
push eax
push edi
mov dword [ebp - 0x10], edi
call sub.iphlpapi.dll_GetIpAddrTable
push dword [ebp - 0x10]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
push edi
lea eax, [ebp - 0x10]
push eax
push ebx
mov dword [ebp - 0x18], ebx
call sub.iphlpapi.dll_GetIpAddrTable
mov esi, dword [ebx]
lea eax, [ebp - 0x504]
push eax
push 0x202
mov dword [ebp - 0x14], esi
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
je 0x402d7f
mov al, 1
jmp 0x402e66
cmp esi, edi
mov byte [ebp - 1], 1
mov dword [ebp - 8], edi
jbe 0x402e54
add ebx, 4
cmp byte [ebp - 1], 0
je 0x402e54
mov eax, dword [ebx + 4]
mov dword [ebp - 0x174], eax
lea eax, [ebp - 0x374]
push eax
call sub.iphlpapi.dll_GetIfEntry
mov esi, dword [ebx]
and dword [ebp - 0xc], 0
mov edi, 0x404158
push esi
push edi
call fcn.00402cb7
test al, al
pop ecx
pop ecx
jne 0x402dda
add dword [ebp - 0xc], 8
add edi, 8
cmp dword [ebp - 0xc], 0x390
jb 0x402dbb
jmp 0x402dde
mov byte [ebp - 1], 0
cmp byte [ebp - 1], 0
je 0x402e54
cmp dword [ebp - 0x154], 5
je 0x402df6
cmp dword [ebp - 0x154], 4
jne 0x402e3c
push 2
push 4
push ebx
call dword [sym.imp.WSOCK32.dll_gethostbyaddr]
mov edi, eax
test edi, edi
je 0x402e3c
push dword [edi]
call fcn.00402c41
test al, al
pop ecx
jne 0x402e50
mov eax, dword [edi + 4]
cmp dword [eax], 0
je 0x402e3c
xor esi, esi
push dword [esi + eax]
call fcn.00402c41
add esi, 4
test al, al
pop ecx
jne 0x402e38
mov eax, dword [edi + 4]
cmp dword [esi + eax], 0
jne 0x402e1d
jmp 0x402e3c
mov byte [ebp - 1], 0
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
add ebx, 0x18
cmp eax, dword [ebp - 0x14]
jb 0x402d91
jmp 0x402e54
mov byte [ebp - 1], 0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
call dword [sym.imp.WSOCK32.dll_WSACleanup]
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x402e6b
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
push ebx
push edi
xor eax, eax
xor ebx, ebx
mov dword [ebp - 0x418], ebx
mov ecx, 0xc3
lea edi, [ebp - 0x414]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov byte [eax], bl
lea eax, [ebp - 0x108]
push eax
call fcn.004010a8
pop ecx
lea eax, [ebp - 0x108]
push eax
push 0x310
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
push ebx
push ebx
push ebx
push 0xf001f
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
je 0x402ef5
push esi
mov esi, eax
mov ecx, 0xc4
lea edi, [ebp - 0x418]
push eax
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea eax, [ebp - 0x310]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
leave
ret
Function at 0x402f02
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov edx, 0x407a08
mov ecx, edx
push edi
xor eax, eax
xor esi, esi
lea edi, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x402f17
sub ecx, edi
mov dword [ebp - 4], ecx
je 0x402f41
movsx ecx, byte [esi + 0x407a08]
add eax, ecx
mov ecx, edx
inc esi
lea edi, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x402f34
sub ecx, edi
cmp esi, ecx
jb 0x402f25
push 0xd
pop ecx
xor edx, edx
div ecx
push dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
mov ebx, edx
inc bl
call dword [sym.imp.USER32.dll_LoadStringA]
xor ecx, ecx
test eax, eax
jle 0x402f6d
xor byte [ecx + esi], bl
inc ecx
cmp ecx, eax
jl 0x402f65
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401138
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov eax, 0x406941
call sub.MSVCRT.dll__EH_prolog
push ecx
push ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push esi
mov esi, ecx
push edi
xor edi, edi
lea eax, [esi + 0x18]
mov dword [ebp - 0x14], esi
push eax
mov dword [esi + 0x14], edi
call ebx
mov dword [esi + 0x10], edi
mov dword [esi + 0xc], edi
mov dword [ebp - 4], edi
mov dword [esi + 8], 0x407460
mov dword [esi + 0x4c], edi
mov dword [esi + 0x50], edi
mov dword [esi + 0x54], edi
mov al, byte [ebp - 0xd]
lea ecx, [esi + 0x58]
mov byte [ebp - 4], 4
mov byte [ecx], al
mov al, byte [ebp - 0xd]
mov byte [ecx + 1], al
mov byte [ecx + 8], 1
call fcn.00403f7f
lea eax, [esi + 0x68]
push eax
call ebx
mov dword [esi + 0x38], edi
mov dword [esi + 0x98], edi
mov dword [esi + 0x88], edi
mov dword [esi + 0x40], edi
mov dword [esi + 0x3c], edi
mov dword [esi + 0x94], edi
mov dword [esi + 0x8c], edi
mov dword [esi + 0x90], edi
mov dword [esi + 0x80], edi
mov dword [esi + 0x84], edi
mov ecx, esi
mov byte [ebp - 4], 6
mov dword [0x409320], esi
call fcn.00403093
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x30], edi
mov dword [esi + 0x44], edi
mov dword [esi + 0x48], edi
mov dword [esi + 0x34], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x401d57
Capabilities:
Create thread

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.00401d2f
test eax, eax
jne 0x401dff
lea ebx, [esi + 0x98]
xor edi, edi
push 1
cmp dword [ebx], edi
pop ebp
jne 0x401e03
push edi
push edi
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push edi
push esi
push 0x402c58
push edi
push edi
mov dword [esi + 0x88], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, edi
mov dword [esi + 0x94], eax
je 0x401dff
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
mov ebp, eax
cmp ebp, edi
mov dword [esi + 0x8c], ebp
je 0x401dff
mov ebx, dword [0x40904c]
push 0xffffffffffffffff
push 0xffffd8f0
push edi
push ebx
call fcn.00406600
push edi
mov dword [esp + 0x14], eax
push edi
push edi
lea eax, [esp + 0x1c]
push ebx
push eax
push ebp
mov dword [esp + 0x2c], edx
call dword [sym.imp.KERNEL32.dll_SetWaitableTimer]
push edi
push edi
push edi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
cmp eax, edi
mov dword [esi + 0x90], eax
jne 0x401e03
xor eax, eax
jmp 0x401e05
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
Function at 0x401e0c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov esi, ecx
call fcn.00401d2f
test eax, eax
jne 0x401eb2
lea ebx, [esi + 0x44]
mov ecx, esi
push ebx
push str.SIMATIC_Logon_Service
call fcn.00402f37
test eax, eax
jne 0x401eb2
xor edi, edi
cmp dword [ebx], edi
je 0x401eb2
cmp dword [esi + 0x38], edi
push 1
lea ebx, [esi + 0x38]
pop eax
mov dword [ebp - 4], eax
jne 0x401ead
push edi
push edi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push edi
push esi
push 0x402003
push edi
push edi
mov dword [esi + 0x40], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esi + 0x40]
mov dword [esi + 0x3c], eax
mov dword [ebp - 8], eax
push 0xffffffffffffffff
lea eax, [ebp - 0xc]
push edi
push eax
push 2
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x401ead
mov eax, dword [esi + 0x3c]
mov dword [ebx], edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, edi
mov dword [ebp - 4], edi
je 0x401ea0
push eax
call ebx
mov dword [esi + 0x3c], edi
mov eax, dword [esi + 0x40]
cmp eax, edi
je 0x401ead
push eax
call ebx
mov dword [esi + 0x40], edi
mov eax, dword [ebp - 4]
jmp 0x401eb4
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x401eb9
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
push edi
xor edi, edi
mov eax, dword [esi + 0x38]
test eax, eax
je 0x401f02
push edi
push edi
push 0x12
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
push dword [0x409048]
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
test edi, edi
je 0x401ef1
push 0xffffffffffffffff
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x3c]
and dword [esi + 0x38], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi + 0x3c], 0
mov eax, edi
pop edi
pop esi
ret
Function at 0x401f07
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
call fcn.00401fdb
mov ecx, esi
call fcn.00401eb9
mov eax, dword [esi + 0x40]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
cmp eax, ebx
je 0x401f2d
push eax
call edi
mov dword [esi + 0x40], ebx
mov eax, dword [esi + 0x8c]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
cmp eax, ebx
je 0x401f41
push eax
call ebp
mov eax, dword [esi + 0x90]
cmp eax, ebx
je 0x401f4e
push eax
call ebp
mov eax, dword [esi + 0x88]
pop ebp
cmp eax, ebx
je 0x401fb1
cmp dword [esi + 0x94], ebx
je 0x401fb1
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [0x409048]
push dword [esi + 0x94]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x401f8f
push 0xffffffffffffffff
push dword [esi + 0x94]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x94]
call edi
push dword [esi + 0x88]
call edi
mov dword [esi + 0x94], ebx
mov dword [esi + 0x88], ebx
mov dword [esi + 0x98], ebx
mov eax, dword [esi + 0x8c]
cmp eax, ebx
je 0x401fc4
push eax
call edi
mov dword [esi + 0x8c], ebx
mov eax, dword [esi + 0x90]
cmp eax, ebx
je 0x401fd7
push eax
call edi
mov dword [esi + 0x90], ebx
pop edi
pop esi
pop ebx
ret
Function at 0x402f37
Capabilities:
Query service configuration
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
push esi
cmp dword [ebp + 8], ebx
push edi
mov dword [eax], ebx
je 0x403089
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x403089
push SysReAllocString
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 8], esi
jne 0x402f82
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40308c
push 0x85
push dword [ebp + 8]
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
cmp eax, ebx
mov dword [ebp + 8], eax
jne 0x402fa9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x403017
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
lea ecx, [ebp - 4]
push ecx
push ebx
push ebx
push eax
mov dword [ebp - 4], ebx
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x7a
mov dword [ebp - 0xc], eax
jne 0x403074
cmp dword [ebp - 4], ebx
je 0x403074
push dword [ebp - 4]
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0x10
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 0xc]
push dword [ebp + 8]
call edi
test eax, eax
jne 0x40301b
call esi
push dword [ebp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
push dword [ebp - 8]
call esi
mov eax, edi
jmp 0x40308c
push 0x1c
lea eax, [ebp - 0x28]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x403041
call esi
mov ebx, eax
jmp 0x403060
mov eax, dword [ebp - 0xc]
cmp dword [eax + 4], 4
je 0x403059
cmp dword [ebp - 0x24], 4
jne 0x403059
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 1
push eax
call fcn.0040648c
pop ecx
push dword [ebp - 8]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp + 8]
call esi
mov eax, ebx
jmp 0x40308c
push dword [ebp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 8]
call esi
mov eax, dword [ebp - 0xc]
jmp 0x40308c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x40531f
Capabilities:
Create thread

Disassembly:
push ecx
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, edi
mov dword [esi + 0x88], eax
jne 0x40533e
xor al, al
jmp 0x405358
lea eax, [esp + 8]
push eax
push edi
push esi
push 0x40535c
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
neg eax
sbb eax, eax
neg eax
pop edi
pop esi
pop ecx
ret
Function at 0x4053b8
Capabilities:
Accept command line arguments
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
xor esi, esi
mov dword [ebp + 0x10], eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.s7acmgrx
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4053f5
xor eax, eax
jmp 0x405550
push ebx
push edi
push esi
push esi
call dword [sym.imp.ole32.dll_CoInitializeEx]
push dword [ebp + 8]
mov ebx, 0x409290
mov dword [0x409300], 0x409020
mov dword [0x409280], ebx
push 0x4091a0
push ebx
mov dword [0x409290], 0x84
mov dword [0x4092f4], 0x300
call dword [sym.imp.ATL.DLL_AtlModuleInit]
mov eax, 0x407530
mov ecx, eax
test ecx, ecx
je 0x405452
push 0x10
push eax
push 0x409270
call sub.MSVCRT.dll_memcpy
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, 0x409200
lea edi, [ebp - 4]
movsw word es:[edi], word [esi]
mov dword [0x409314], eax
lea eax, [ebp - 4]
movsb byte es:[edi], byte [esi]
xor esi, esi
push eax
push dword [ebp + 0x10]
mov dword [ebp + 8], esi
call fcn.00405377
mov edi, eax
pop ecx
cmp edi, esi
pop ecx
je 0x4054dc
push str.UnregServer
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4054a8
push str.RegServer
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4054c3
lea eax, [ebp - 4]
push eax
push edi
jmp 0x405474
push esi
push esi
push esi
push 0x64
push ebx
call dword [sym.imp.ATL.DLL_AtlModuleUpdateRegistryFromResourceD]
push esi
push 1
push ebx
call dword [sym.imp.ATL.DLL_AtlModuleUnregisterServerEx]
mov dword [ebp + 8], eax
jmp 0x40552c
push esi
push esi
push 1
push 0x64
push ebx
call dword [sym.imp.ATL.DLL_AtlModuleUpdateRegistryFromResourceD]
push esi
push 1
push ebx
call dword [sym.imp.ATL.DLL_AtlModuleRegisterServer]
jmp 0x4054be
mov ecx, ebx
call fcn.0040531f
push 5
push 4
push ebx
call dword [sym.imp.ATL.DLL_AtlModuleRegisterClassObjects]
call dword [sym.imp.ole32.dll_CoResumeClassObjects]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push esi
push esi
lea eax, [ebp - 0x24]
push esi
push eax
call edi
test eax, eax
je 0x40551a
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push esi
push esi
lea eax, [ebp - 0x24]
push esi
push eax
jmp 0x405501
push ebx
call dword [sym.imp.ATL.DLL_AtlModuleRevokeClassObjects]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
call dword [sym.imp.ATL.DLL_AtlModuleTerm]
call dword [sym.imp.ole32.dll_CoUninitialize]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
pop edi
pop ebx
pop esi
leave
ret 0x10