joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4016b0
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa10
mov eax, dword [0x42bba8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0xf003f
xor edi, edi
push edi
push edi
mov ebx, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x401709
push 1
lea eax, [ebx + 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x4016fa
push eax
mov edi, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
jne 0x401844
push 0x104
lea ecx, [ebp - 0x20e]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4017aa
cmp eax, 0x104
je 0x4017aa
mov edx, 0x22
mov word [ebp - 0x210], dx
mov ecx, edx
xor edx, edx
push 0xf003f
push edx
push edx
mov word [ebp + eax*2 - 0x20e], cx
mov word [ebp + eax*2 - 0x20c], dx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
jne 0x4017bd
push 0x400
lea eax, [ebp - 0xa10]
push eax
push 0xd80a
call fcn.00401100
add esp, 0xc
test eax, eax
jne 0x401795
push str.Could_not_open_Service_Manager
lea ecx, [ebp - 0xa10]
push 0x400
push ecx
call fcn.00401020
add esp, 0xc
push 0
add ebx, 0x2c
push ebx
lea edx, [ebp - 0xa10]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fba6
mov esp, ebp
pop ebp
ret
push 0
push 0
push str.RPCSS
push 0
push 0
lea eax, [ebp - 0x210]
push eax
push 1
push 3
push 0x10
push 0xf01ff
lea edi, [ebx + 0x2c]
push edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
jne 0x401838
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x400
lea ecx, [ebp - 0xa10]
push ecx
push 0xd80b
call fcn.00401100
add esp, 0xc
test eax, eax
jne 0x401829
push 0x421858
lea edx, [ebp - 0xa10]
push 0x400
push edx
call fcn.00401020
add esp, 0xc
push 0
push edi
lea eax, [ebp - 0xa10]
push eax
jmp 0x4017a2
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call edi
push esi
call edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0040fba6
mov esp, ebp
pop ebp
ret
Function at 0x401860
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.00410470
mov eax, dword [0x42bba8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
mov edi, ecx
mov dword [ebp - 0x1024], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x4018cb
push 1
lea ebx, [edi + 0x2c]
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x4018ba
push eax
mov edi, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4018c0
mov edi, dword [ebp - 0x1024]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
jne 0x4018e1
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fba6
mov esp, ebp
pop ebp
ret
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x40193b
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0xd80a
call fcn.00401100
add esp, 0xc
test eax, eax
jne 0x40192c
push str.Could_not_open_Service_Manager
lea ecx, [ebp - 0x804]
push 0x400
push ecx
call fcn.00401020
add esp, 0xc
push 0
push ebx
lea edx, [ebp - 0x804]
push edx
jmp 0x401a78
push 0x10020
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x401999
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0xd80c
call fcn.00401100
add esp, 0xc
test eax, eax
jne 0x40192c
push str.Could_not_open_service
lea ecx, [ebp - 0x804]
push 0x400
push ecx
call fcn.00401020
add esp, 0xc
push esi
push ebx
lea edx, [ebp - 0x804]
push edx
jmp 0x401a78
lea eax, [ebp - 0x1020]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x401a12
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x401a12
cmp eax, 0x425
jne 0x4019ca
cmp dword [ebp - 0x101c], 3
je 0x401a12
push 0x400
lea ecx, [ebp - 0x804]
push ecx
push 0xd80e
call fcn.00401100
add esp, 0xc
test eax, eax
jne 0x401a00
push str.Could_not_stop_service
lea edx, [ebp - 0x804]
push 0x400
push edx
call fcn.00401020
add esp, 0xc
push 0
push ebx
lea eax, [ebp - 0x804]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x1024], eax
call esi
push edi
call esi
cmp dword [ebp - 0x1024], 0
jne 0x4018cb
push 0x400
lea ecx, [ebp - 0x1004]
push ecx
push 0xd80d
call fcn.00401100
add esp, 0xc
test eax, eax
jne 0x401a6e
push str.Could_not_delete_service
lea edx, [ebp - 0x1004]
push 0x400
push edx
call fcn.00401020
add esp, 0xc
push 0
push ebx
lea eax, [ebp - 0x1004]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0040fba6
mov esp, ebp
pop ebp
ret
Function at 0x401fe0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
cmp byte [0x42ce00], 0
jne 0x402030
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [ebp - 4]
push ecx
push eax
mov ecx, 0x42ce08
call fcn.00401e00
cmp al, 1
jne 0x402030
mov edx, dword [ebp + 0x14]
push edx
mov ecx, 0x42ce08
call fcn.00401d90
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
mov esp, ebp
pop ebp
ret 0x10

Function at 0x402d80
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x402d9b
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x402dd2
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x402dce
jmp 0x402dc0
cmp esi, eax
jae 0x402dd2
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x402dc0
cmp esi, eax
jb 0x402dd9
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x402f70
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x42bba8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push 0xfe
lea ecx, [ebp - 0x10a]
xor eax, eax
push ebx
push ecx
mov dword [ebp - 0x120], 0x11c
mov dword [ebp - 0x11c], ebx
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x114], ebx
mov dword [ebp - 0x110], ebx
mov word [ebp - 0x10c], ax
call fcn.0040fbc0
xor edx, edx
mov dword [ebp - 0xc], edx
add esp, 0xc
lea edx, [ebp - 0x120]
xor ecx, ecx
push edx
mov dword [ebp - 8], ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
pop ebx
test eax, eax
je 0x402ffe
cmp dword [ebp - 0x11c], 5
jbe 0x402ffe
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fba6
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.0040fba6
mov esp, ebp
pop ebp
ret
Function at 0x404df0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f4d8
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push esi
mov eax, dword [0x42bba8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0xc]
mov esi, ecx
push 0x40
lea eax, [ebp - 0x60]
push 0
push eax
call fcn.0040fbc0
add esp, 0xc
xor eax, eax
push 1
push edi
lea edx, [ebp - 0x10]
xor ecx, ecx
push edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x64], 0x44
mov dword [ebp - 0x5c], 0x42b368
mov word [ebp - 0x34], cx
mov dword [ebp - 0x38], 1
mov dword [ebx], eax
mov dword [ebp - 0x10], eax
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x404f3f
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp + 0xc]
call fcn.00404400
push 0x422158
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0
call fcn.00404c30
test esi, esi
jne 0x404e96
xor eax, eax
jmp 0x404eaf
mov eax, esi
lea edx, [eax + 2]
jmp 0x404ea0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404ea0
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp + 0xc]
call fcn.00403df0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x20]
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x64]
push edx
push 0
push eax
push 0x430
push 0
push 0
push 0
push ecx
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x404eec
mov edx, dword [ebp - 0x18]
mov dword [ebx], edx
xor esi, esi
jmp 0x404f17
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test eax, eax
jle 0x404f04
and esi, 0xffff
or esi, 0x80070000
push eax
push str.CreateProcessAsUser_Failure_:_last_error___ld
push 0x42ce08
call fcn.004012d0
add esp, 0xc
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404f6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x404f6a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test eax, eax
jle 0x404f57
and esi, 0xffff
or esi, 0x80070000
push eax
push str.Create_Env_Failed_Last_Error___ld
push 0x42ce08
call fcn.004012d0
add esp, 0xc
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x404f77
push eax
call sub.USERENV.dll_DestroyEnvironmentBlock
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408140
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 0x14]
push edi
xor edi, edi
cmp ecx, edi
je 0x4081b5
cmp ebx, edi
je 0x4081b5
push esi
or eax, 2
push eax
mov eax, dword [ebp + 8]
push ecx
push eax
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
call fcn.00407cf0
mov esi, eax
cmp esi, edi
mov edi, dword [ebp - 0xc]
jne 0x4081a1
mov esi, dword [ebp + 0x10]
mov eax, 4
cmp esi, 1
jne 0x40818f
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
mov ecx, dword [ebp + 0xc]
push eax
push ebx
push esi
push 0
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
test edi, edi
je 0x4081ac
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, 0x1e7
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4081c0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ecx]
xor ebx, ebx
push edi
cmp eax, ebx
je 0x40822d
cmp esi, ebx
je 0x40822d
mov edx, dword [ebp + 8]
push 2
push eax
push edx
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call fcn.00407cf0
mov edi, eax
cmp edi, ebx
mov ebx, dword [ebp - 0xc]
jne 0x408212
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
mov eax, dword [ebp + 0xc]
push esi
push 1
push 0
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test ebx, ebx
je 0x40821d
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
xor eax, eax
cmp edi, ebx
pop edi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 0x1e7
xor eax, eax
cmp edi, ebx
pop edi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x408ef0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41fb53
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x42bba8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
fld dword [0x422a18]
xor edi, edi
fstp dword [esi + 0xc]
mov dword [esi], edi
fld dword [0x422a14]
mov dword [esi + 4], edi
fstp dword [esi + 0x10]
mov dword [esi + 8], 0x11
fld dword [0x422a10]
mov dword [esi + 0x18], 0xffffffff
fstp dword [esi + 0x14]
mov dword [esi + 0x1c], edi
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], 0xa
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
call fcn.00408050
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
sub eax, 0x10
push eax
mov dword [ebp - 4], edi
call fcn.00403220
add eax, 0x10
mov dword [esi + 0x30], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
sub eax, 0x10
push eax
mov byte [ebp - 4], 1
call fcn.00403220
add esp, 8
add eax, 0x10
mov dword [esi + 0x34], eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x4093f0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41fbc8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x42bba8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], ecx
mov ebx, dword [ebp + 8]
lea eax, [ebp + 8]
push eax
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x1c]
push eax
mov edi, 0x80004005
push ebx
add ecx, 0x14
mov dword [ebp - 0x10], edi
call fcn.00405940
mov esi, eax
test esi, esi
je 0x409574
mov edx, dword [0x42bb74]
mov eax, dword [edx + 0xc]
mov ecx, 0x42bb74
call eax
add eax, 0x10
mov dword [ebp + 8], eax
push ebx
lea ecx, [ebp + 8]
push str.Global_s
push ecx
mov dword [ebp - 4], 0
call fcn.00403eb0
mov edx, dword [ebp + 8]
mov edi, dword [esi + 4]
add esp, 0xc
push edx
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi], eax
test eax, eax
je 0x409537
mov eax, dword [esi + 4]
cmp dword [eax], 0
je 0x409537
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x20]
push eax
push ebx
add ecx, 0x44
call fcn.00405940
mov edi, eax
test edi, edi
je 0x409537
cmp dword [edi + 4], 0
je 0x4094e1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0xc4]
push eax
mov eax, dword [esi + 4]
mov ecx, dword [eax]
push ebx
push edx
push ecx
mov ecx, dword [edi + 4]
call fcn.00409070
mov edi, dword [edi + 4]
push 0
push 0
push edi
push 0x408b40
push 0
push 0
call fcn.0041132d
xor edx, edx
add esp, 0x18
test eax, eax
setne dl
mov esi, edx
test eax, eax
je 0x40950e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x409530
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x409521
mov dword [ebp - 0x10], eax
jmp 0x409537
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x10], eax
jmp 0x409537
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40955d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4097c0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41fc42
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x42bba8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x21c]
push edx
xor edi, edi
push 0x20019
push edi
push ecx
push eax
mov dword [ebp - 0x234], esi
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x21c], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
cmp ebx, edi
jne 0x4098fb
mov ecx, dword [ebp - 0x21c]
push edi
push edi
push edi
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x220]
push eax
push edi
push edi
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov ebx, eax
mov eax, dword [ebp - 0x220]
cmp eax, edi
je 0x4098fb
mov dword [ebp - 0x224], edi
test eax, eax
je 0x4098fb
mov ecx, dword [ebp - 0x21c]
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x228]
push edx
lea eax, [ebp - 0x218]
push eax
push edi
push ecx
mov dword [ebp - 0x228], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov ebx, eax
test ebx, ebx
jne 0x4098e8
mov edi, dword [esi + 4]
mov dword [ebp - 0x22c], edi
cmp edi, dword [esi + 8]
jb 0x4098b6
lea edx, [edi + 1]
push edx
mov ecx, esi
call fcn.00405a20
test al, al
je 0x409925
mov eax, dword [esi]
lea ecx, [eax + edi*4]
mov dword [ebp - 0x230], ecx
mov dword [ebp - 4], 0
test ecx, ecx
je 0x4098d8
lea edx, [ebp - 0x218]
push edx
call fcn.00404400
inc dword [esi + 4]
mov edi, dword [ebp - 0x224]
mov dword [ebp - 4], 0xffffffff
inc edi
mov dword [ebp - 0x224], edi
cmp edi, dword [ebp - 0x220]
jb 0x409865
mov eax, dword [ebp - 0x21c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040fba6
mov esp, ebp
pop ebp
ret
push 0x8007000e
call fcn.00401000
int3
Function at 0x40d3e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ecx + 0x40], 0x14
lea eax, [ecx + 0x40]
push esi
mov dword [ebp - 4], 0
jne 0x40d43c
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 4]
push edi
lea edx, [esi + 0xc]
push edx
lea edx, [ebp - 4]
push edx
push 0x14
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
test edi, edi
je 0x40d426
xor eax, eax
mov dword [esi + 0x1838], eax
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x1838], eax
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push str.During_WriteFile_the_sizeof_buffer_is_not_matching_PipeSrv::PipeServerResponse
mov esi, 2
call fcn.0040d170
push str.DISCONNECTING
push str.state_change_to:___s
mov esi, 1
call fcn.0040d170
mov eax, dword [ebp + 8]
add esp, 0xc
mov dword [eax], 0xf
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x40d480
Capabilities:
Connect pipe

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push str.Current_State:_to_OverlappedPipeContext::PIPE_SRV_STATE_INITIALIZED
mov esi, 1
call fcn.0040d170
push str.Current_State:OverlappedPipeContext::PIPE_SRV_STATE_INITIALIZED
call fcn.0040d170
push str.Executing_HandleInitialState
call fcn.0040d170
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
add esp, 0xc
lea ecx, [edi + 0xc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40d4d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x40d520
cmp eax, 0x3e5
je 0x40d4f8
push str.Modified_State:_OverlappedPipeContext::PIPE_SRV_STATE_ERROR
call fcn.0040d170
push str.ERROR
push str.state_change_to:___s
call fcn.0040d170
add esp, 0xc
mov dword [edi], esi
pop edi
pop esi
pop ebp
ret 4
push str.CONNECTING
push str.state_change_to:___s
call fcn.0040d170
push str.State_Modified_to_OverlappedPipeContext::PIPE_SRV_STATE_CONNECTING
mov dword [edi], 3
call fcn.0040d170
add esp, 0xc
pop edi
pop esi
pop ebp
ret 4
push str.State_Modified_to_OverlappedPipeContext::PIPE_SRV_STATE_CONNECTED
call fcn.0040d170
push str.CONNECTED
push str.state_change_to:___s
call fcn.0040d170
add esp, 0xc
mov dword [edi], 4
pop edi
pop esi
pop ebp
ret 4
Function at 0x40d6c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push str.Current_State:_to_OverlappedPipeContext::PIPE_SRV_STATE_CONNECTED
mov esi, 1
mov ebx, ecx
call fcn.0040d170
mov edi, dword [ebp + 8]
push 0x1800
lea esi, [edi + 0x24]
push 0
push esi
call fcn.0040fbc0
mov eax, dword [edi + 4]
add esp, 0x10
lea ecx, [edi + 0xc]
push ecx
lea edx, [edi + 0x1830]
push edx
push 0x1800
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
test esi, esi
je 0x40d712
xor eax, eax
jmp 0x40d718
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x1838], eax
test esi, esi
jne 0x40d7cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x40d7cf
push str.DISCONNECTING
mov esi, 1
push str.state_change_to:___s
cmp eax, 0x6d
jne 0x40d7b0
call fcn.0040d170
push str.Modified_State:_to_OverlappedPipeContext::PIPE_SRV_STATE_DISCONNECTING
mov dword [edi], 0xf
call fcn.0040d170
add esp, 0xc
push edi
mov ecx, ebx
call fcn.0040d550
push str.Pipe_Client_has_disconnected
call fcn.0040d170
push str.Current_State:_to_OverlappedPipeContext::PIPE_SRV_STATE_DISCONNECTING
call fcn.0040d170
push str.INITIALIZED
push str.state_change_to:___s
call fcn.0040d170
push str.Modified_State:_to_OverlappedPipeContext::PIPE_SRV_STATE_INITIALIZED
mov dword [edi], 2
call fcn.0040d170
add esp, 0x14
push edi
mov ecx, ebx
call fcn.0040d480
pop edi
pop esi
pop ebx
pop ebp
ret 4
call fcn.0040d170
push str.Modified_State:_to_OverlappedPipeContext::PIPE_SRV_STATE_DISCONNECTING
mov dword [edi], 0xf
call fcn.0040d170
add esp, 0xc
pop edi
pop esi
pop ebx
pop ebp
ret 4
push str.READING
push str.state_change_to:___s
mov esi, 1
call fcn.0040d170
push str.Modified_State:_to_OverlappedPipeContext::PIPE_SRV_STATE_READING
mov dword [edi], 0xb
call fcn.0040d170
add esp, 0xc
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x40d800
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push str.Current_State:_to_OverlappedPipeContext::PIPE_SRV_STATE_READING
mov esi, 1
call fcn.0040d170
mov ebx, dword [ebp + 8]
add esp, 4
cmp dword [ebx], 0xb
jne 0x40d9c5
mov eax, dword [ebx + 4]
push edi
push 0
lea edi, [ebx + 0x1830]
push edi
lea ecx, [ebx + 0xc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov esi, eax
mov dword [ebp - 4], esi
test esi, esi
je 0x40d849
xor eax, eax
jmp 0x40d84f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x1838], eax
test esi, esi
je 0x40d8e3
mov dword [ebp + 8], 0
mov eax, dword [ebx + 0x24]
mov dword [ebx + 0x1828], eax
cmp eax, 0x1470
jne 0x40d99d
push 0x1474
lea ecx, [ebx + 0x1824]
call fcn.0040d210
mov eax, dword [edi]
mov esi, dword [ebx + 0x1824]
push eax
lea ecx, [ebx + 0x24]
push ecx
push eax
push esi
call fcn.004107a6
add esi, dword [edi]
add esp, 0x10
cmp dword [ebp - 4], 0
je 0x40d977
jmp 0x40d8b0
cmp dword [ebp + 8], 0xea
jne 0x40d977
mov eax, dword [ebx + 4]
push 0
push edi
push 0x1800
lea ecx, [ebx + 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 4], eax
test eax, eax
je 0x40d946
mov dword [ebp + 8], 0
jmp 0x40d95a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
cmp eax, 0xea
je 0x40d864
cmp eax, 0x3e4
je 0x40d9c4
cmp dword [ebx + 0x1824], 0
lea ecx, [ebx + 0x1824]
je 0x40d916
call fcn.0040d280
push str.DISCONNECTING
push str.state_change_to:___s
mov esi, 1
call fcn.0040d170
push str.Modified_state:_to_OverlappedPipeContext::PIPE_SRV_STATE_DISCONNECTING
mov dword [ebx], 0xf
call fcn.0040d170
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
test eax, eax
je 0x40d95a
cmp eax, 0xea
jne 0x40d977
mov eax, dword [edi]
push eax
lea ecx, [ebx + 0x24]
push ecx
push eax
push esi
call fcn.004107a6
add esi, dword [edi]
add esp, 0x10
cmp dword [ebp - 4], 0
jne 0x40d8b0
push str.READ_COMPLETE
push str.state_change_to:___s
mov esi, 1
call fcn.0040d170
add esp, 8
pop edi
pop esi
mov dword [ebx], 0xc
pop ebx
mov esp, ebp
pop ebp
ret 4
push str.WRITING
push str.state_change_to:___s
mov esi, 1
mov dword [ebx + 0x183c], 7
call fcn.0040d170
mov dword [ebx], 0xd
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4