joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401423
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
push 0x408620
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 2
push edi
mov ebx, eax
push 0xfffffffffffffff8
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x401470
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40150e
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x401506
cmp dword [ebp - 4], 4
jb 0x401506
cmp dword [ebp - 8], 0x53445250
jne 0x401506
push edi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push ebx
call esi
test eax, eax
je 0x401506
cmp dword [ebp - 4], 4
jb 0x401506
push edi
push edi
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x401506
push edi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x401506
cmp dword [ebp - 4], 4
jb 0x401506
cmp dword [ebp - 8], 0x53445250
jne 0x401506
push 0x408304
push ebx
call fcn.00401000
push 0x408300
push ebx
call fcn.00401000
push 0x408308
push ebx
call fcn.00401000
add esp, 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebx
leave
ret
Function at 0x40180d
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4061d8
call fcn.004030d8
mov edi, 0x94
mov eax, edi
call fcn.00403230
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x408330], ecx
mov eax, dword [esi + 4]
mov dword [0x40833c], eax
mov edx, dword [esi + 8]
mov dword [0x408340], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x408334], esi
cmp ecx, 2
je 0x40186d
or esi, 0x8000
mov dword [0x408334], esi
shl eax, 8
add eax, edx
mov dword [0x408338], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4018a8
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4018a8
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4018c0
cmp eax, 0x20b
je 0x4018ad
mov dword [ebp - 0x1c], esi
jmp 0x4018d4
cmp dword [ecx + 0x84], 0xe
jbe 0x4018a8
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4018ce
cmp dword [ecx + 0x74], 0xe
jbe 0x4018a8
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00401a03
pop ecx
test eax, eax
jne 0x401900
cmp dword [0x408318], 1
jne 0x4018ed
call fcn.004028a4
push 0x1c
call fcn.0040272d
push 0xff
call fcn.00402592
pop ecx
pop ecx
call fcn.0040304d
mov dword [ebp - 4], esi
call fcn.00402ea2
test eax, eax
jge 0x401919
push 0x1b
call fcn.004017e8
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x408ab8], eax
call fcn.00402d80
mov dword [0x408310], eax
call fcn.00402cde
test eax, eax
jge 0x40193f
push 8
call fcn.004017e8
pop ecx
call fcn.00402aab
test eax, eax
jge 0x401950
push 9
call fcn.004017e8
pop ecx
push 1
call fcn.004025c2
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x401966
push eax
call fcn.004017e8
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00402a4e
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x401987
movzx eax, word [ebp - 0x40]
jmp 0x40198a
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401512
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4019a8
push edi
call fcn.004026ed
call fcn.0040270f
jmp 0x4019da
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00403113
ret
Function at 0x40262c
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x408370], esi
push edi
jne 0x40264c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x40836c], esi
mov byte [0x408368], al
jne 0x4026b2
mov ecx, dword [0x408a88]
test ecx, ecx
je 0x402693
mov eax, dword [0x408a84]
sub eax, 4
cmp eax, ecx
jmp 0x40268c
mov eax, dword [eax]
test eax, eax
je 0x40267e
call eax
mov eax, dword [0x408a84]
sub eax, 4
cmp eax, dword [0x408a88]
mov dword [0x408a84], eax
jae 0x402676
mov eax, 0x40801c
mov esi, 0x408020
cmp eax, esi
mov edi, eax
jae 0x4026b2
mov eax, dword [edi]
test eax, eax
je 0x4026ab
call eax
add edi, 4
cmp edi, esi
jb 0x4026a3
mov eax, 0x408024
mov esi, 0x408028
cmp eax, esi
mov edi, eax
jae 0x4026d1
mov eax, dword [edi]
test eax, eax
je 0x4026ca
call eax
add edi, 4
cmp edi, esi
jb 0x4026c2
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x4026eb
push dword [ebp + 8]
mov dword [0x408370], 1
call fcn.00402592
pop ebp
ret

Function at 0x40272d
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4081d0]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4080a0]
je 0x402762
inc eax
cmp eax, 0x13
jb 0x402753
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4080a0]
jne 0x402888
mov eax, dword [0x408318]
cmp eax, 1
je 0x402860
cmp eax, edx
jne 0x402792
cmp dword [0x408094], 1
je 0x402860
cmp ecx, 0xfc
je 0x402888
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4027c8
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.004016f0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00401660
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4027fc
mov eax, edi
push eax
call fcn.00401660
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4065f0
push edi
call fcn.00403770
add esp, 0x10
push edi
call fcn.00401660
push dword [esi + 0x4080a4]
mov ebx, eax
call fcn.00401660
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00403230
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004016f0
push edi
push ebx
call fcn.00401700
push 0x4065d0
push ebx
call fcn.00401700
push dword [esi + 0x4080a4]
push ebx
call fcn.00401700
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00403669
add esp, 0x2c
jmp 0x402888
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4080a4]
push dword [esi]
call fcn.00401660
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.004038c5
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x401940
Capabilities:
Modify service
Persist via windows service
Set registry value

Disassembly:
mov eax, 0x1810
call fcn.0046a1a0
mov eax, dword [0x4bcb20]
xor eax, esp
mov dword [esp + 0x180c], eax
push esi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [esp + 4], esi
test esi, esi
je 0x401ac8
push ebx
push 0xf003f
push 0x4a1384
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x401ac0
push 0xfff
lea eax, [esp + 0x819]
push 0
push eax
mov byte [esp + 0x820], 0
call fcn.004683b0
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
push 0x1000
lea edx, [esp + 0x81c]
push edx
push ebx
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x401ab9
push ebp
push edi
push str.SystemCurrentControlSetServices_
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x4a1384
lea ecx, [esp + 0x20]
push ecx
call esi
push str.Instances
lea edx, [esp + 0x20]
push edx
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x4a1440
call ebp
mov edi, dword [sym.imp.SHLWAPI.dll_SHSetValueW]
add eax, eax
push eax
push 0x4a1440
push 1
push str.DefaultInstance
lea eax, [esp + 0x2c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call edi
push str.Top
lea ecx, [esp + 0x20]
push ecx
call esi
push str.586333
call ebp
add eax, eax
push eax
push str.586333
push 1
push str.Altitude
lea edx, [esp + 0x2c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call edi
push 4
lea eax, [esp + 0x18]
push eax
push 4
push str.Flags
lea ecx, [esp + 0x2c]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], 1
call edi
cmp dword [esp + 0x81c], 2
pop edi
pop ebp
je 0x401ab5
push 0
push 0
push 0
push str.FltMgr
push 0
push str.FSFilter_Activity_Monitor
push 0
push 1
push 1
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov esi, dword [esp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebx
mov ecx, dword [esp + 0x1810]
pop esi
xor ecx, esp
call fcn.00469030
add esp, 0x1810
ret
Function at 0x401ae0
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
push 0x48e730
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bcb20]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov eax, dword [esp + 0x34]
xor ebp, ebp
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x20], ebp
call fcn.00401020
mov dword [esp + 0x2c], ebp
mov edi, dword [eax]
cmp edi, ebp
je 0x401b3a
cmp dword [edi + 4], ebp
jne 0x401b35
mov ecx, dword [edi]
push ecx
call fcn.004884c0
mov dword [edi + 4], eax
mov edi, dword [edi + 4]
jmp 0x401b3c
xor edi, edi
mov esi, dword [sym.imp.imagehlp.dll_ImageLoad]
push ebp
push edi
call esi
mov dword [esp + 0x2c], 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x401b9a
mov edi, eax
add eax, 8
push eax
call ebx
cmp eax, ebp
jne 0x401b96
cmp edi, ebp
je 0x401b96
mov eax, dword [edi]
cmp eax, ebp
je 0x401b7d
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [edi + 4]
cmp eax, ebp
je 0x401b8d
push eax
call fcn.0044577e
add esp, 4
push edi
call fcn.0044577e
add esp, 4
mov dword [esp + 0x14], ebp
mov edx, dword [esp + 0x38]
push edx
lea ecx, [esp + 0x1c]
call fcn.00401020
mov dword [esp + 0x2c], 1
mov edi, dword [eax]
cmp edi, ebp
je 0x401bcb
cmp dword [edi + 4], ebp
jne 0x401bc6
mov eax, dword [edi]
push eax
call fcn.004884c0
mov dword [edi + 4], eax
mov edi, dword [edi + 4]
jmp 0x401bcd
xor edi, edi
push ebp
push edi
call esi
mov esi, eax
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x401c15
mov edi, eax
add eax, 8
push eax
call ebx
test eax, eax
jne 0x401c11
cmp edi, ebp
je 0x401c11
mov eax, dword [edi]
cmp eax, ebp
je 0x401bf8
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [edi + 4]
cmp eax, ebp
je 0x401c08
push eax
call fcn.0044577e
add esp, 4
push edi
call fcn.0044577e
add esp, 4
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.imagehlp.dll_ImageUnload]
cmp eax, ebp
je 0x401c42
cmp esi, ebp
je 0x401c3f
mov edx, dword [eax + 0xc]
mov ecx, dword [esi + 0xc]
mov dx, word [edx + 4]
cmp dx, word [ecx + 4]
jne 0x401c3f
mov dword [esp + 0x1c], 1
push eax
call edi
cmp esi, ebp
je 0x401c49
push esi
call edi
cmp dword [esp + 0x1c], ebp
je 0x401c82
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
call fcn.00401fb0
test eax, eax
je 0x401c82
push ebp
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, 1
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
xor eax, eax
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x401ca0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x80c
mov eax, dword [0x4bcb20]
xor eax, esp
mov dword [esp + 0x804], eax
push esi
push edi
push 0
call fcn.00401180
add esp, 4
cmp eax, 0xffffffff
jne 0x401cde
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x804]
xor ecx, esp
call fcn.00469030
add esp, 0x80c
ret
push eax
call dword [sym.imp.ntdll.dll_NtClose]
push 0x200
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push str.Drivers_
lea ecx, [esp + 0xc]
push ecx
call esi
push str.Estdlock.SYS
lea edx, [esp + 0xc]
push edx
call esi
push 0x200
lea eax, [esp + 0x40c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x408]
push 0x5c
push ecx
call fcn.0046906c
add esp, 8
test eax, eax
je 0x401d8e
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea esi, [eax + 2]
push 0x4a14d4
push esi
call edi
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x40c]
push eax
call fcn.00401ae0
add esp, 8
test eax, eax
jne 0x401d89
push 0x4a14f0
push esi
call edi
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x40c]
push edx
call fcn.00401ae0
add esp, 8
test eax, eax
je 0x401d8e
call fcn.00401940
mov ecx, dword [esp + 0x80c]
pop edi
pop esi
xor ecx, esp
mov eax, 1
call fcn.00469030
add esp, 0x80c
ret

Function at 0x401fb0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x414
mov eax, dword [0x4bcb20]
xor eax, esp
mov dword [esp + 0x410], eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
cmp eax, 0xffffffff
je 0x401fdd
push esi
call edi
test eax, 0x10000
je 0x402003
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x402003
mov eax, 1
pop edi
mov ecx, dword [esp + 0x410]
xor ecx, esp
call fcn.00469030
add esp, 0x414
ret
lea eax, [esp + 4]
push eax
mov ecx, esi
call fcn.00405370
add esp, 4
test eax, eax
je 0x401fe8
lea ecx, [esp + 0x20c]
push ecx
mov ecx, ebx
call fcn.00405370
add esp, 4
test eax, eax
je 0x401fe8
lea edx, [esp + 4]
push edx
lea ecx, [esp + 0x210]
call fcn.004054f0
mov ecx, dword [esp + 0x418]
dec eax
add esp, 4
neg eax
sbb eax, eax
pop edi
xor ecx, esp
inc eax
call fcn.00469030
add esp, 0x414
ret
Function at 0x402060
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x48e6cb
mov eax, dword fs:[0]
push eax
sub esp, 0x830
mov eax, dword [0x4bcb20]
xor eax, esp
mov dword [esp + 0x828], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bcb20]
xor eax, esp
push eax
lea eax, [esp + 0x844]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x854]
push str.SystemCurrentControlSetServices_
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebp
lea ecx, [esp + 0x40]
push ecx
call esi
push str.Instances
lea edx, [esp + 0x40]
push edx
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x4a1440
call ebx
mov edi, dword [sym.imp.SHLWAPI.dll_SHSetValueW]
add eax, eax
push eax
push 0x4a1440
push 1
push str.DefaultInstance
lea eax, [esp + 0x4c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call edi
push str.Top
lea ecx, [esp + 0x40]
push ecx
call esi
push str.586333
call ebx
add eax, eax
push eax
push str.586333
mov esi, 1
push esi
push str.Altitude
lea edx, [esp + 0x4c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call edi
push 4
lea eax, [esp + 0x24]
push eax
push 4
push str.Flags
lea ecx, [esp + 0x4c]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x38], esi
call edi
lea edx, [esp + 0x1c]
push edx
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4021ac
lea eax, [esp + 0x24]
push eax
push str.SeLoadDriverPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x4021ac
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
push 0
push 0
push 0x10
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x2c]
push 0
push ecx
mov dword [esp + 0x44], esi
mov dword [esp + 0x50], 2
mov dword [esp + 0x4c], edx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push str.FltLib
mov esi, 0x45a
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x402219
push str.FilterLoad
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x402212
push ebp
lea ecx, [esp + 0x1c]
call fcn.00401020
mov dword [esp + 0x84c], 0
mov eax, dword [eax]
test eax, eax
je 0x4021f3
mov eax, dword [eax]
jmp 0x4021f5
xor eax, eax
push eax
call edi
test eax, eax
jg 0x402200
mov esi, eax
jmp 0x402209
movzx esi, ax
or esi, 0x80070000
lea ecx, [esp + 0x18]
call fcn.004010d0
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x402238
cmp esi, 0xb7
je 0x402238
cmp esi, 0x420
je 0x402238
xor eax, eax
jmp 0x402242
call fcn.00402860
mov eax, 1
mov ecx, dword [esp + 0x844]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x828]
xor ecx, esp
call fcn.00469030
add esp, 0x83c
ret
Function at 0x402270
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x21c
mov eax, dword [0x4bcb20]
xor eax, esp
mov dword [esp + 0x218], eax
push esi
push edi
mov ecx, 0x11
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
push 0x1c2
lea eax, [esp + 0x62]
push 0
push eax
movsw word es:[edi], word [esi]
call fcn.004683b0
add esp, 0xc
test ebx, ebx
je 0x402340
push ebx
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea edx, [esp + 8]
push edx
push 1
push 0
lea eax, [esp + 0x24]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402340
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1c]
push eax
push 0
push str.Start
mov edi, 4
push ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 8]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x402340
cmp dword [esp + 0xc], edi
jne 0x402340
lea eax, [edi - 3]
pop edi
pop esi
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.00469030
add esp, 0x21c
ret
mov ecx, dword [esp + 0x220]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.00469030
add esp, 0x21c
ret

Function at 0x402360
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x214
mov eax, dword [0x4bcb20]
xor eax, esp
mov dword [esp + 0x210], eax
push esi
push edi
mov ecx, 0x11
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
push 0x1c2
lea eax, [esp + 0x5a]
push 0
push eax
mov dword [esp + 0x18], 1
movsw word es:[edi], word [esi]
call fcn.004683b0
add esp, 0xc
test ebx, ebx
jne 0x4023c1
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.00469030
add esp, 0x214
ret
push ebx
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea edx, [esp + 8]
push edx
push 2
push 0
lea eax, [esp + 0x1c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4023a8
mov edx, dword [esp + 8]
push 4
lea ecx, [esp + 0x10]
push ecx
push 4
push eax
push str.Start
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x218]
xor eax, eax
test esi, esi
pop edi
sete al
pop esi
xor ecx, esp
call fcn.00469030
add esp, 0x214
ret
Function at 0x402e20
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, ecx
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x10], edx
lea edx, [esp + 0x10]
push edx
push eax
push edi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x402e53
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x402e7e
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 8]
push eax
shl esi, 9
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402e7e
cmp esi, dword [esp + 4]
jne 0x402e7e
mov eax, 1
pop esi
add esp, 0xc
ret
xor eax, eax
pop esi
add esp, 0xc
ret

Function at 0x402e90
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, ecx
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x10], edx
lea edx, [esp + 0x10]
push edx
push eax
push edi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x402ec3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x402eee
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 8]
push eax
shl esi, 9
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402eee
cmp esi, dword [esp + 4]
jne 0x402eee
mov eax, 1
pop esi
add esp, 0xc
ret
xor eax, eax
pop esi
add esp, 0xc
ret

Function at 0x403060
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x24]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x28]
xor edx, edx
div dword [esi + 8]
push edi
mov ebp, 1
mov dword [esp + 0x14], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x14]
push 0
push eax
call fcn.00402f60
mov ecx, dword [esi + 8]
mov ebx, eax
mov eax, dword [esp + 0x3c]
xor edx, edx
div ecx
add esp, 8
sub ecx, edx
mov edi, ecx
cmp edi, ebp
jbe 0x4030a6
mov edi, ebp
test ebx, ebx
jne 0x4030c1
mov ecx, dword [esp + 0x30]
mov ebx, edi
shl ebx, 9
push ebx
push 0
push ecx
call fcn.004683b0
add esp, 0xc
jmp 0x403122
mov eax, dword [esp + 0x2c]
mov esi, dword [eax]
lea eax, [edx + ebx]
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x28], edx
lea edx, [esp + 0x28]
push edx
push eax
push esi
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4030f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40313d
mov ecx, dword [esp + 0x30]
push 0
lea eax, [esp + 0x1c]
push eax
mov ebx, edi
shl ebx, 9
push ebx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40313d
cmp ebx, dword [esp + 0x18]
jne 0x40313d
mov dword [esp + 0x1c], 1
add dword [esp + 0x34], edi
add dword [esp + 0x30], ebx
inc dword [esp + 0x14]
sub ebp, edi
test ebp, ebp
je 0x403147
mov esi, dword [esp + 0x2c]
jmp 0x403080
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x403160
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x20]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
xor edx, edx
div dword [ebp + 8]
push esi
push edi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x28]
push 1
push eax
mov esi, ebp
call fcn.00402f60
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x40322b
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x30]
xor edx, edx
div edi
mov eax, dword [esp + 0x34]
sub edi, edx
cmp edi, eax
jbe 0x4031aa
mov edi, eax
mov esi, dword [ebp]
lea eax, [edx + ecx]
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x20], edx
lea edx, [esp + 0x20]
push edx
push eax
push esi
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4031dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40322b
mov ecx, dword [esp + 0x2c]
push 0
lea eax, [esp + 0x18]
push eax
mov ebx, edi
shl ebx, 9
push ebx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40322b
cmp ebx, dword [esp + 0x14]
jne 0x40322b
mov eax, dword [esp + 0x34]
add dword [esp + 0x30], edi
add dword [esp + 0x2c], ebx
inc dword [esp + 0x28]
sub eax, edi
mov dword [esp + 0x34], eax
test eax, eax
jne 0x403178
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret