joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4029e0
Capabilities:
Access peb ldr_data
Encode data using xor
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x40a008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, edx
push ebx
push esi
push edi
mov ebx, dword [eax + 8]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x402a40
mov edx, dword [eax + 0xc]
test edx, 0x2000000
je 0x402a56
mov esi, dword [eax]
cmp esi, dword [eax + 4]
jne 0x402a40
cmp dword [eax + 0x10], 0
jne 0x402a2e
mov eax, dword [ecx]
mov edi, dword [ecx + 0x3c]
cmp dword [eax + 0x38], edi
je 0x402a2e
xor edx, edx
mov eax, ebx
div edi
test edx, edx
jne 0x402a40
push dword [ecx + 0x34]
mov eax, dword [ecx + 0x20]
push 0x4000
push ebx
push esi
call eax
add esp, 0x10
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403f2e
mov esp, ebp
pop ebp
ret
mov ecx, edx
mov eax, edx
shr eax, 0x1e
and eax, 1
shr ecx, 0x1d
and ecx, 1
lea ecx, [eax + ecx*2]
mov eax, edx
shr eax, 0x1f
lea eax, [eax + ecx*2]
mov eax, dword [eax*4 + 0x408448]
mov ecx, eax
or ecx, 0x200
and edx, 0x4000000
cmove ecx, eax
mov eax, dword fs:[0x30]
mov dword [ebp - 0x14], ecx
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
nop dword [eax + eax]
mov edx, dword [eax + 0x18]
mov dword [ebp - 0x10], edx
mov ecx, dword [edx + 0x3c]
mov ecx, dword [ecx + edx + 0x78]
add ecx, edx
mov dword [ebp - 0xc], ecx
cmp ecx, edx
je 0x402b04
mov edi, dword [ecx + 0x18]
test edi, edi
je 0x402b04
mov ecx, dword [ecx + 0x20]
lea ebx, [ecx + edi*4]
add ebx, edx
mov ecx, dword [ebx - 4]
lea ebx, [ebx - 4]
add ecx, edx
dec edi
mov esi, 0x3849683f
mov dl, byte [ecx]
inc ecx
test dl, dl
je 0x402afd
nop word [eax + eax]
movsx edx, dl
lea ecx, [ecx + 1]
xor edx, esi
imul esi, edx, 0x1000193
mov dl, byte [ecx - 1]
test dl, dl
jne 0x402ae0
cmp esi, 0xa95d189
je 0x402b08
mov edx, dword [eax + 0x18]
test edi, edi
jne 0x402ac5
mov eax, dword [eax]
jmp 0x402aa0
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov eax, dword [esi + 0x24]
lea eax, [eax + edi*2]
movzx ecx, word [eax + edx]
mov eax, dword [esi + 0x1c]
lea eax, [eax + ecx*4]
mov eax, dword [eax + edx]
lea ecx, [ebp - 8]
push ecx
push dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
add eax, edx
push dword [ebp - 0x18]
push dword [ecx]
call eax
test eax, eax
jne 0x402a40
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403f2e
mov esp, ebp
pop ebp
ret
Function at 0x402e80
Capabilities:
Access peb ldr_data
Encode data using xor
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, dword fs:[0x30]
push ebx
push esi
push edi
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
nop dword [eax + eax]
mov edx, dword [eax + 0x18]
mov dword [ebp - 8], edx
mov ecx, dword [edx + 0x3c]
mov ecx, dword [ecx + edx + 0x78]
add ecx, edx
mov dword [ebp - 4], ecx
cmp ecx, edx
je 0x402f04
mov edi, dword [ecx + 0x18]
test edi, edi
je 0x402f04
mov ecx, dword [ecx + 0x20]
lea ebx, [ecx + edi*4]
add ebx, edx
mov ecx, dword [ebx - 4]
lea ebx, [ebx - 4]
add ecx, edx
dec edi
mov esi, 0x388ef08d
mov dl, byte [ecx]
inc ecx
test dl, dl
je 0x402efd
nop word [eax + eax]
movsx edx, dl
lea ecx, [ecx + 1]
xor edx, esi
imul esi, edx, 0x1000193
mov dl, byte [ecx - 1]
test dl, dl
jne 0x402ee0
cmp esi, 0x216c7079
je 0x402f08
mov edx, dword [eax + 0x18]
test edi, edi
jne 0x402ec5
mov eax, dword [eax]
jmp 0x402ea0
mov esi, dword [ebp - 4]
mov edx, dword [ebp - 8]
push dword [ebp + 0x14]
mov eax, dword [esi + 0x24]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
lea eax, [eax + edi*2]
movzx ecx, word [eax + edx]
mov eax, dword [esi + 0x1c]
push dword [ebp - 0xc]
lea eax, [eax + ecx*4]
mov eax, dword [eax + edx]
add eax, edx
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x402f40
Capabilities:
Access peb ldr_data
Encode data using xor
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, dword fs:[0x30]
push ebx
push esi
push edi
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
nop dword [eax + eax]
mov edx, dword [eax + 0x18]
mov dword [ebp - 8], edx
mov ecx, dword [edx + 0x3c]
mov ecx, dword [ecx + edx + 0x78]
add ecx, edx
mov dword [ebp - 4], ecx
cmp ecx, edx
je 0x402fc4
mov edi, dword [ecx + 0x18]
test edi, edi
je 0x402fc4
mov ecx, dword [ecx + 0x20]
lea ebx, [ecx + edi*4]
add ebx, edx
mov ecx, dword [ebx - 4]
lea ebx, [ebx - 4]
add ecx, edx
dec edi
mov esi, 0x3aedc819
mov dl, byte [ecx]
inc ecx
test dl, dl
je 0x402fbd
nop word [eax + eax]
movsx edx, dl
lea ecx, [ecx + 1]
xor edx, esi
imul esi, edx, 0x1000193
mov dl, byte [ecx - 1]
test dl, dl
jne 0x402fa0
cmp esi, 0x5a053bd6
je 0x402fc8
mov edx, dword [eax + 0x18]
test edi, edi
jne 0x402f85
mov eax, dword [eax]
jmp 0x402f60
mov esi, dword [ebp - 4]
mov edx, dword [ebp - 8]
push dword [ebp + 0x10]
mov eax, dword [esi + 0x24]
push dword [ebp + 0xc]
push dword [ebp - 0xc]
lea eax, [eax + edi*2]
movzx ecx, word [eax + edx]
mov eax, dword [esi + 0x1c]
lea eax, [eax + ecx*4]
mov eax, dword [eax + edx]
add eax, edx
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403300
Capabilities:
Accept command line arguments
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x58
call dword [sym.imp.kernel32.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
test ax, ax
je 0x40338b
cmp ax, 9
je 0x403378
cmp ax, 0x20
je 0x403378
mov dword [ebp - 0x54], 0
xor edi, edi
nop
cmp ax, 0x5c
je 0x4033e0
cmp ax, 0x22
je 0x4033f0
mov dword [ebp - 0x54], 0
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x40338b
cmp ax, 9
sete cl
cmp ax, 0x20
mov esi, ecx
sete cl
mov edx, esi
or dl, cl
je 0x403330
test edi, 1
jne 0x403330
lea esi, [esi]
movzx eax, word [ebx + 2]
add ebx, 2
cmp ax, 9
je 0x403378
cmp ax, 0x20
je 0x403378
lea eax, [ebp - 0x50]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoW]
sub esp, 4
test byte [ebp - 0x24], 1
je 0x403408
movzx esi, word [ebp - 0x20]
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._wWinMain_16
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
inc dword [ebp - 0x54]
jmp 0x40334b
and dword [ebp - 0x54], 1
jne 0x403344
xor edi, 1
jmp 0x40334b
mov eax, 1
mov esi, 1
mov word [ebp - 0x20], ax
jmp 0x4033a4

Function at 0x403420
Capabilities:
Get process heap flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov dword [esp], 1
call sym.__configure_wide_argv
call sym.__initialize_wide_environment
call sym.___p___argc
mov esi, dword [eax]
call sym.___p___wargv
mov edi, dword [eax]
call sym.__get_initial_wide_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
inc eax
mov dword [esp], eax
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._wmain
mov dword [esp], eax
call sym._exit
nop
nop
nop
nop
nop

Function at 0x401000
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push 0
call dword [sym.imp.ole32.dll_OleInitialize]
push 0x3c
lea eax, [ebp - 0x3c]
push 0
push eax
call sub.MSVCR80.dll_memset
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x20], eax
add esp, 0xc
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0x3c
mov dword [ebp - 0x38], 0x500
mov dword [ebp - 0x30], str.open
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
call dword [sym.imp.ole32.dll_OleUninitialize]
leave
ret 0x10
Function at 0x490d00
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x77000]
push edi
or ebp, 0xffffffff
jmp 0x490d22
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x490d29
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x490d18
mov eax, 1
add ebx, ebx
jne 0x490d3b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x490d4c
jne 0x490d6b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x490d6b
dec eax
add ebx, ebx
jne 0x490d58
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x490d30
add ebx, ebx
jne 0x490d67
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x490dbd
xor ecx, ecx
sub eax, 3
jb 0x490d83
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x490df2
sar eax, 1
mov ebp, eax
jmp 0x490d8e
add ebx, ebx
jne 0x490d8e
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x490d5c
inc ecx
add ebx, ebx
jne 0x490d9c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x490d5c
add ebx, ebx
jne 0x490da9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x490d9e
jne 0x490dba
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x490d9e
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x490ddc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x490dce
jmp 0x490d1e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x490ddc
add edi, ecx
jmp 0x490d1e
pop esi
mov edi, esi
mov ecx, 0x397
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x490dfa
cmp byte [edi], 6
jne 0x490dfa
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x490dff
lea edi, [esi + 0x8e000]
mov eax, dword [edi]
or eax, eax
je 0x490e77
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x908cc]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x90908]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x490e2c
mov ecx, edi
jns 0x490e5b
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x9090c]
or eax, eax
je 0x490e71
mov dword [ebx], eax
add ebx, 4
jmp 0x490e49
call dword [esi + 0x90914]
mov ebp, dword [esi + 0x90910]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1e7]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x490eab
sub esp, 0xffffff80
jmp 0x40279c
Function at 0x444a39
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x48b840]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x444a84
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00444ffa
test al, al
jne 0x444a7e
sub edx, 2
cmp edx, edi
jne 0x444a64
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x444aa6
lea eax, [edi + 2]
cmp edx, eax
je 0x444aa6
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00444632
add esp, 0x10
jmp 0x444ba0
push esi
lea ecx, [ebp - 0x255]
call fcn.00444ffa
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x444ae9
push dword [ebp - 0x25c]
jmp 0x444a96
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x444b26
cmp word [ebp - 0x226], 0
je 0x444b47
cmp word [ebp - 0x226], ax
jne 0x444b26
cmp word [ebp - 0x224], 0
je 0x444b47
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00444632
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x444b93
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x444b00
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x444b7b
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x444ba0
push 0x443f18
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004036ac
add esp, 0x10
jmp 0x444b70
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040222a
leave
ret
Function at 0x4579e9
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x48d910]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x457a29
cmp byte [ebx], 0xa
jne 0x457a29
or byte [eax + edi + 0x28], 4
jmp 0x457a2e
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x457b2c
mov al, byte [edx]
cmp al, 0x1a
je 0x457b0e
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x457a5d
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x457a82
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x457a8c
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x457a3f
jmp 0x457b2c
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x457b09
cmp dword [ebp - 0xc], 0
je 0x457b09
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x48d910]
test byte [eax + edi + 0x28], 0x48
je 0x457ae3
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x457ace
mov byte [esi], dl
jmp 0x457adf
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x48d910]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x457b2c
cmp byte [ebp - 1], 0xa
jne 0x457af2
cmp esi, ebx
jne 0x457af2
mov byte [esi], 0xa
jmp 0x457b2b
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040150a
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x457b2c
mov byte [esi], 0xd
jmp 0x457b2b
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x48d910]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x457b28
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x457b2c
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x457b88
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x48d910]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x457bcb
cmp word [esi], dx
jne 0x457bcb
or byte [edi + eax + 0x28], 4
jmp 0x457bd0
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x457d23
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x457d03
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x457c12
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x457c48
cmp eax, edx
jae 0x457c54
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x457bea
jmp 0x457d23
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x457cff
cmp dword [ebp - 0x14], 0
je 0x457cff
mov eax, dword [ebx*4 + 0x48d910]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x457cd7
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x457ca0
mov word [esi], cx
jmp 0x457cd3
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x48d910]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x48d910]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x48d910]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x457d23
pop ebx
cmp word [ebp - 4], bx
jne 0x457ce8
cmp esi, dword [ebp + 0xc]
jne 0x457ce8
mov word [esi], bx
jmp 0x457d20
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0040150a
add esp, 0x10
cmp word [ebp - 4], bx
je 0x457d23
push 0xd
jmp 0x457d1c
mov ecx, dword [ebx*4 + 0x48d910]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x457d1a
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x457d23
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x401370
Capabilities:
Enumerate services
Get process heap flags
Stop service

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x38]
push ebx
sub esp, 0x54
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x34]
mov ebx, dword [sym.imp.advapi32.dll_EnumDependentServicesW]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], edx
call ebx
sub esp, 0x18
test eax, eax
jne 0x401410
mov edi, eax
xor ecx, ecx
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xea
je 0x401440
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, edi
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor ecx, ecx
lea eax, [ebp - 0x30]
mov dword [ebp - 0x40], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_ControlService]
mov ecx, dword [ebp - 0x40]
sub esp, 0xc
mov edi, eax
jmp 0x4013d8
mov ecx, dword [ebp - 0x38]
mov dword [esp + 4], 0
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov ecx, eax
lea eax, [ebp - 0x34]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x44], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 4], 1
mov dword [esp], eax
call ebx
mov ecx, dword [ebp - 0x44]
sub esp, 0x18
test eax, eax
je 0x4013d8
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4013d8
mov dword [ebp - 0x48], ecx
lea ebx, [ecx + 4]
xor esi, esi
mov eax, dword [ebx]
mov dword [esp], 0x68
mov dword [esp + 4], eax
call sym._output_string
mov dword [esp + 8], 0xf003f
mov eax, dword [ebx - 4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov edx, eax
test eax, eax
je 0x4014ff
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
call sym._StopService
mov edx, dword [ebp - 0x44]
mov edi, eax
mov dword [esp], edx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
sub esp, 4
test edi, edi
je 0x401520
inc esi
add ebx, 0x24
cmp dword [ebp - 0x34], esi
ja 0x4014ad
mov ecx, dword [ebp - 0x48]
test edi, edi
jne 0x401412
jmp 0x4013d8
mov eax, dword [ebx]
mov dword [esp], 0x69
mov dword [esp + 4], eax
call sym._output_string
jmp 0x401503
Function at 0x401ee0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x401f38
cmp byte [esi + ebx - 1], 0xa
je 0x401f0c
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x4040f8], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0x10
pop ebx
pop esi
pop ebp
ret
Function at 0x401fe0
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x2018
call fcn.00401050
sub esp, eax
mov ebx, edx
mov eax, dword [esp + eax]
mov dword [esp + 8], 0xf003f
mov dword [ebp - 0x2018], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.advapi32.dll_OpenSCManagerW]
sub esp, 0xc
test eax, eax
je 0x4021b0
mov dword [esp + 8], 0xf003f
mov esi, eax
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
mov dword [ebp - 0x2014], eax
sub esp, 0xc
test eax, eax
je 0x4021d0
lea eax, [ebp - 0x2010]
lea edi, [ebp - 0x200c]
mov dword [esp + 4], ebx
mov dword [ebp - 0x2010], 0x1000
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp], esi
call dword [sym.imp.advapi32.dll_GetServiceDisplayNameW]
sub esp, 0x10
cmp word [ebp - 0x200c], 0
jne 0x4020a0
xor eax, eax
lea esi, cs:[esi]
movzx edx, word [ebx + eax]
mov word [edi + eax], dx
add eax, 2
test dx, dx
jne 0x402090
cmp dword [ebp - 0x2018], 2
mov dword [esp + 4], edi
jne 0x402110
mov dword [esp], 0x6f
call sym._output_string
mov edx, dword [ebp - 0x2014]
mov eax, esi
call sym._StopService
mov ebx, eax
test eax, eax
je 0x402160
mov dword [esp + 4], edi
mov dword [esp], 0x70
call sym._output_string
mov eax, dword [ebp - 0x2014]
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov dword [esp], eax
call edi
sub esp, 4
mov dword [esp], esi
call edi
mov eax, ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x6c
call sym._output_string
mov eax, dword [ebp - 0x2014]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_StartServiceW]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x402180
mov dword [esp + 4], edi
mov dword [esp], 0x6d
call sym._output_string
jmp 0x4020e0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
call sym._output_error_string
mov ebx, eax
test eax, eax
je 0x4021f8
xor ebx, ebx
jmp 0x4020e0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
call sym._output_error_string
mov ebx, eax
test eax, eax
jne 0x402178
mov dword [esp + 4], edi
mov dword [esp], 0x6e
call sym._output_string
jmp 0x4020e0
mov dword [esp], 0x6a
xor ebx, ebx
call sym._output_string
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x6b
xor ebx, ebx
call sym._output_string
mov dword [esp], esi
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov eax, ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], edi
mov dword [esp], 0x71
call sym._output_string
jmp 0x4020e0