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

Disassembly:
mov eax, 0x1004
call fcn.00407770
mov eax, dword [0x42c008]
xor eax, esp
mov dword [esp + 0x1000], eax
mov eax, dword [esp + 0x1008]
push ebx
push esi
mov esi, dword [esp + 0x1018]
push edi
mov edi, dword [esp + 0x1018]
push 0x420200
push eax
call fcn.00402970
push esi
push edi
mov ebx, eax
call fcn.00403ed0
add esp, 0x10
xor edi, edi
mov esi, eax
test ebx, ebx
je 0x403baf
push ebx
test esi, esi
je 0x403bb4
call fcn.00409779
add esp, 4
test eax, eax
jne 0x403b86
nop dword [eax + eax]
push ebx
push 0x1000
lea eax, [esp + 0x14]
push 1
push eax
call fcn.0040999b
add esp, 0x10
test eax, eax
jne 0x403b49
push ebx
call fcn.004097a4
add esp, 4
test eax, eax
je 0x403b6b
push ebx
jmp 0x403b7b
push esi
push eax
lea eax, [esp + 0x14]
push 1
push eax
call fcn.0040a4ba
add esp, 0x10
test eax, eax
je 0x403b7a
push esi
call fcn.004097a4
add esp, 4
test eax, eax
jne 0x403b7a
push ebx
call fcn.00409779
add esp, 4
test eax, eax
je 0x403b20
jmp 0x403b86
push esi
call fcn.0040f2bc
add esp, 4
or edi, 0xffffffff
push ebx
call fcn.004096f9
push esi
call fcn.004096f9
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1000]
xor ecx, esp
call fcn.00407754
add esp, 0x1004
ret
test esi, esi
je 0x403bbc
push esi
call fcn.004096f9
add esp, 4
mov ecx, dword [esp + 0x100c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00407754
add esp, 0x1004
ret
Function at 0x403c30
Capabilities:
Get common file path
Set environment variable

Disassembly:
mov eax, 0x302c
call fcn.00407770
mov eax, dword [0x42c008]
xor eax, esp
mov dword [esp + 0x3028], eax
mov eax, dword [esp + 0x3030]
push ebx
push ebp
mov ebp, dword [esp + 0x303c]
mov dword [esp + 8], eax
push esi
push edi
test ebp, ebp
je 0x403cb6
push 0x421624
call fcn.00403e20
push ebp
mov ebx, eax
lea eax, [esp + 0x3c]
push 0x1000
push eax
call fcn.004029e0
push 0
push 0x421624
push 0
call fcn.00404ad0
mov edi, eax
lea eax, [esp + 0x50]
push 0
push eax
push 0
call fcn.00404ad0
mov esi, eax
push esi
push edi
call fcn.0040e155
push edi
call fcn.00409673
push esi
call fcn.00409673
add esp, 0x38
jmp 0x403cba
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x1038]
push eax
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call sub.KERNEL32.dll_GetCurrentProcessId
push eax
push 0x421628
lea eax, [esp + 0x1c]
push 0x10
push eax
call fcn.00404700
add esp, 0x10
xor esi, esi
nop dword [eax]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x103c]
push eax
call fcn.0040f2a1
mov edi, eax
push edi
call fcn.00404a30
add esp, 0xc
test eax, eax
je 0x403d82
push edi
call fcn.00409673
inc esi
add esp, 4
cmp esi, 5
jl 0x403cf0
test ebp, ebp
je 0x403d7e
push 0
push 0x421624
push 0
call fcn.00404ad0
test ebx, ebx
je 0x403d67
push 0
push ebx
push 0
mov edi, eax
call fcn.00404ad0
mov esi, eax
push esi
push edi
call fcn.0040e155
push edi
call fcn.00409673
push esi
call fcn.00409673
push ebx
call fcn.00409673
add esp, 0x2c
xor eax, eax
jmp 0x403df8
add esp, 0xc
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
call fcn.00409673
add esp, 4
xor eax, eax
jmp 0x403df8
push 0x1000
push edi
push dword [esp + 0x18]
call fcn.00404b70
push edi
call fcn.00409673
add esp, 0x10
test ebp, ebp
je 0x403df3
push 0
push 0x421624
push 0
call fcn.00404ad0
test ebx, ebx
je 0x403ddc
push 0
push ebx
push 0
mov edi, eax
call fcn.00404ad0
mov esi, eax
push esi
push edi
call fcn.0040e155
push edi
call fcn.00409673
push esi
call fcn.00409673
push ebx
call fcn.00409673
add esp, 0x2c
jmp 0x403df3
add esp, 0xc
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
call fcn.00409673
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x3038]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00407754
add esp, 0x302c
ret
Function at 0x403e20
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x4004
call fcn.00407770
mov eax, dword [0x42c008]
xor eax, esp
mov dword [esp + 0x4000], eax
mov eax, dword [esp + 0x4008]
push 0
push eax
push 0
call fcn.00404ad0
add esp, 0xc
lea ecx, [esp]
push 0x2000
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x403eb0
push 0x2000
lea eax, [esp + 0x2004]
push eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0
lea eax, [esp + 4]
push eax
push 0
call fcn.00404b70
add esp, 0xc
test eax, eax
je 0x403eb0
cmp byte [eax], 0
je 0x403eb0
push eax
call fcn.0040d566
add esp, 4
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.00407754
add esp, 0x4004
ret
mov ecx, dword [esp + 0x4000]
xor eax, eax
xor ecx, esp
call fcn.00407754
add esp, 0x4004
ret

Function at 0x4043b0
Capabilities:
Set environment variable

Disassembly:
push esi
push edi
push 0
push dword [esp + 0x10]
push 0
call fcn.00404ad0
add esp, 0xc
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
mov esi, eax
call fcn.00409673
add esp, 4
mov eax, esi
pop edi
pop esi
ret

Function at 0x4043e0
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
mov eax, 0x2068
call fcn.00407770
mov eax, dword [0x42c008]
xor eax, esp
mov dword [esp + 0x2064], eax
mov eax, dword [esp + 0x206c]
push 0x1000
push eax
lea eax, [esp + 0x6c]
mov dword [esp + 8], 0
push eax
call fcn.00404ad0
push 1
push 0x16
call fcn.0040ed36
push 1
push 2
call fcn.0040ed36
push 1
push 0xf
call fcn.0040ed36
push 1
push 0x15
call fcn.0040ed36
add esp, 0x2c
mov dword [esp + 4], 0xc
lea eax, [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp + 0xc], 1
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, 1
mov dword [esp + 0x24], 0
push 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x50], 0x101
mov word [esp + 0x54], ax
call fcn.0040a5da
push eax
call fcn.0040db8e
push eax
call fcn.0040e87f
push 1
mov dword [esp + 0x68], eax
call fcn.0040a5da
push eax
call fcn.0040db8e
push eax
call fcn.0040e87f
push 2
mov dword [esp + 0x78], eax
call fcn.0040a5da
push eax
call fcn.0040db8e
push eax
call fcn.0040e87f
add esp, 0x24
mov dword [esp + 0x60], eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
push 0
push 0
push 0
push 1
push 0
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea eax, [esp + 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x404537
push 0xffffffffffffffff
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [esp]
mov ecx, dword [esp + 0x2064]
xor ecx, esp
call fcn.00407754
add esp, 0x2068
ret
push str.Error_creating_child_process__n
push 0x4216ec
call fcn.004018c0
mov ecx, dword [esp + 0x206c]
add esp, 8
xor ecx, esp
or eax, 0xffffffff
call fcn.00407754
add esp, 0x2068
ret
Function at 0x404a30
Capabilities:
Create directory

Disassembly:
sub esp, 0x38
mov eax, dword [0x42c008]
xor eax, esp
mov dword [esp + 0x34], eax
movups xmm0, xmmword [str.D:_A__FA___S_1_3_4_]
push esi
mov esi, dword [esp + 0x40]
lea eax, [esp + 8]
movups xmmword [esp + 0x10], xmm0
push 0
movups xmm0, xmmword [0x4218b4]
push eax
push 1
movups xmmword [esp + 0x2c], xmm0
lea eax, [esp + 0x1c]
mov dword [esp + 0x10], 0xc
movq xmm0, qword [0x4218c4]
push eax
movq qword [esp + 0x40], xmm0
mov dword [esp + 0x1c], 0
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
jne 0x404aa3
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00407754
add esp, 0x38
ret
lea eax, [esp + 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [esp + 0x38]
neg eax
pop esi
sbb eax, eax
xor ecx, esp
neg eax
dec eax
call fcn.00407754
add esp, 0x38
ret
Function at 0x412373
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004121f2

Function at 0x4165b5
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00415f23

Function at 0x4165c0
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041615e
Function at 0x414d7f
Capabilities:
Change the wallpaper

Disassembly:
push ebx
push esi
push edi
mov edi, edx
sub ecx, 0
je 0x414e2b
sub ecx, 1
je 0x414e1d
sub ecx, 1
je 0x414e0f
sub ecx, 1
je 0x414ddc
sub ecx, 1
jne 0x414e6d
push 1
sub esp, 0x18
mov ecx, esp
push 0x4595d0
call fcn.00402178
mov esi, str.Control_PanelDesktop
push str.WallpaperStyle
mov edx, esi
call fcn.0040d202
add esp, 0x20
push 1
sub esp, 0x18
mov ecx, esp
push 0x4595cc
jmp 0x414e59
push 1
sub esp, 0x18
mov ecx, esp
push 0x45ef10
call fcn.00402178
mov esi, str.Control_PanelDesktop
push str.WallpaperStyle
mov edx, esi
call fcn.0040d202
add esp, 0x20
push 1
sub esp, 0x18
mov ecx, esp
push 0x4595d0
jmp 0x414e59
push 1
sub esp, 0x18
mov ecx, esp
push 0x45f27c
jmp 0x414de8
push 1
sub esp, 0x18
mov ecx, esp
push 0x4595b8
jmp 0x414de8
push 1
sub esp, 0x18
mov ebx, 0x4595d0
mov ecx, esp
push ebx
call fcn.00402178
mov esi, str.Control_PanelDesktop
push str.WallpaperStyle
mov edx, esi
call fcn.0040d202
add esp, 0x20
push 1
sub esp, 0x18
mov ecx, esp
push ebx
call fcn.00402178
push str.TileWallpaper
mov edx, esi
call fcn.0040d202
add esp, 0x20
push 3
push edi
push 0
push 0x14
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
pop edi
pop esi
pop ebx
ret

Function at 0x415128
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
mov bl, cl
call dword [sym.imp.KERNEL32.dll_AllocConsole]
call dword [0x467a18]
test bl, bl
mov dword [0x467a34], eax
pop ebx
jne 0x415150
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
push edi
push 1
call fcn.00433e83
push eax
push 0x45f640
push str.CONOUT_
call fcn.004377e9
add esp, 0x10
push 0x4e4
call dword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
call fcn.004150e5
push 0x64
lea eax, [ebp - 0x64]
push 0
push eax
call fcn.0042ec70
lea edi, [ebp - 0x64]
add esp, 0xc
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x415190
mov esi, str._n_tRemcos_v
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x64]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4151a6
mov esi, str.5.1.2_Light
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x64]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4151ba
push 6
pop ecx
mov esi, 0x45f748
lea eax, [ebp - 0x64]
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
call fcn.00413981
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x41a3df
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [ecx + 4]
xor eax, eax
xor edx, edx
movzx ecx, word [esi]
cmp ax, cx
jae 0x41a40a
movzx eax, dx
mov al, byte [eax + esi + 4]
cmp al, 0x13
je 0x41a40a
cmp al, 0xc0
je 0x41a40a
cmp al, 0xcc
je 0x41a40a
add edx, 2
cmp dx, cx
jb 0x41a3ef
pop esi
ret
Function at 0x441caa
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00441848

Function at 0x1819160
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.018192b0
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x1819186
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1819172
add dl, dl
jne 0x1819191
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x18191e4
xor eax, eax
add dl, dl
jne 0x181919e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1819285
add dl, dl
jne 0x18191ad
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x18191b8
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x18191c3
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x18191ce
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x18191da
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x181917d
mov eax, 1
add dl, dl
jne 0x18191f2
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x18191fd
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x18191e9
sub eax, ebx
mov ebx, 1
jne 0x1819230
mov ecx, 1
add dl, dl
jne 0x1819216
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1819221
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x181920d
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x181917d
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1819247
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1819252
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x181923e
cmp eax, 0x7d00
jae 0x1819275
cmp eax, 0x500
jb 0x1819270
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x181917d
cmp eax, 0x7f
ja 0x1819278
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x181917d
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x18192a6
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x181917d
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x40279c
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
imul edx, dword [0x40f02c], 0x8088405
inc edx
mov dword [0x40f02c], edx
mul edx
mov eax, edx
ret

Function at 0x403cd0
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, edx
mov edx, dword [ebx + 4]
sub edx, 0xd7b1
cmp edx, 2
ja 0x403d2c
push ecx
push 0
mov eax, esp
push 0
push eax
mov eax, dword [ebx + 8]
mul ecx
push eax
push esi
push dword [ebx]
call sub.kernel32.dll_ReadFile
dec eax
pop eax
pop ecx
jne 0x403d1e
xor edx, edx
div dword [ebx + 8]
mov edx, dword [esp + 0xc]
test edx, edx
je 0x403d13
mov dword [edx], eax
pop esi
pop ebx
ret 4
cmp eax, ecx
je 0x403d0e
mov eax, 0x64
jmp 0x403d23
call sub.kernel32.dll_GetLastError
call fcn.00402674
xor eax, eax
jmp 0x403d0e
mov eax, 0x67
jmp 0x403d23

Function at 0x403d34
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, edx
mov eax, dword [eax + 4]
sub eax, 0xd7b2
cmp eax, 1
ja 0x403d8f
push ecx
push 0
mov eax, esp
push 0
push eax
mov eax, dword [ebx + 8]
mul ecx
push eax
push esi
push dword [ebx]
call sub.kernel32.dll_WriteFile
dec eax
pop eax
pop ecx
jne 0x403d81
xor edx, edx
div dword [ebx + 8]
mov edx, dword [esp + 0xc]
test edx, edx
je 0x403d76
mov dword [edx], eax
pop esi
pop ebx
ret 4
cmp eax, ecx
je 0x403d71
mov eax, 0x65
jmp 0x403d86
call sub.kernel32.dll_GetLastError
call fcn.00402674
xor eax, eax
jmp 0x403d71
mov eax, 0x67
jmp 0x403d86

Function at 0x403e18
Capabilities:
Get file size

Disassembly:
push ebx
mov ebx, eax
mov edx, dword [ebx + 4]
sub edx, 0xd7b1
cmp edx, 2
ja 0x403e48
push 0
push dword [ebx]
call sub.kernel32.dll_GetFileSize
cmp eax, 0xffffffff
je 0x403e3e
xor edx, edx
div dword [ebx + 8]
pop ebx
ret
call fcn.00402684
or eax, 0xffffffff
jmp 0x403e3c
mov eax, 0x67
call fcn.00402674
or eax, 0xffffffff
jmp 0x403e3c

Function at 0x40548c
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x4054c5
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.0040325c
jmp 0x4054ce
mov eax, ebx
mov edx, esi
call fcn.00403210
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4054d8
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x4054f9
mov al, byte [esp]
jmp 0x4054fb
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x4072a4
Capabilities:
Hash data with crc32

Disassembly:
push esi
xor esi, esi
mov ecx, 0x40f580
mov eax, esi
mov edx, 8
test al, 1
je 0x4072c0
shr eax, 1
xor eax, 0xedb88320
jmp 0x4072c2
shr eax, 1
dec edx
jne 0x4072b3
mov dword [ecx], eax
inc esi
add ecx, 4
cmp esi, 0x100
jne 0x4072ac
pop esi
ret
Function at 0x4072d8
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
mov ebx, eax
cmp byte [0x40f57c], 0
jne 0x4072f6
call fcn.004072a4
mov byte [0x40f57c], 1
mov eax, edi
test esi, esi
je 0x407321
mov edx, ebx
and dx, 0xff
xor ecx, ecx
mov cl, byte [eax]
xor dx, cx
movzx edx, dx
mov edx, dword [edx*4 + 0x40f580]
shr ebx, 8
xor edx, ebx
mov ebx, edx
dec esi
inc eax
test esi, esi
jne 0x4072fc
mov eax, ebx
pop edi
pop esi
pop ebx
ret

Function at 0x40b1b8
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0xc], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x40b23d
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
call sub.kernel32.dll_SetErrorMode
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x40b220
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0xc]
mov eax, ebx
call fcn.0040b4c0
mov eax, dword [ebp - 0xc]
call fcn.0040341c
push eax
call sub.kernel32.dll_GetFileAttributesA
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40b227
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_SetErrorMode
ret

Function at 0x40b2c4
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
mov esi, eax
call sub.kernel32.dll_GetCommandLineA_1
mov ebx, eax
xor eax, eax
mov dl, byte [ebx]
sub dl, 1
jb 0x40b2f0
sub dl, 0x1f
je 0x40b2e8
sub dl, 2
je 0x40b2e4
jmp 0x40b2ec
xor al, 1
jmp 0x40b2ec
test al, al
je 0x40b2f0
inc ebx
jmp 0x40b2d1
inc ebx
cmp byte [ebx], 0x20
je 0x40b2ef
mov eax, esi
mov edx, ebx
call fcn.0040329c
pop esi
pop ebx
ret

Function at 0x40b564
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
mov edx, ebx
mov eax, esp
call fcn.00405014
add esp, 0x104
pop ebx
ret

Function at 0x40b674
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
xor eax, eax
push ebp
push 0x40b71d
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 8]
push eax
push 0
push edi
push esi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x40b707
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
je 0x40b6c0
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jne 0x40b707
cmp dword [ebp - 0xc], 2
jge 0x40b6d2
mov eax, dword [ebp - 4]
call fcn.0040317c
mov bl, 1
jmp 0x40b707
mov edx, dword [ebp - 0xc]
dec edx
lea eax, [ebp - 0x10]
call fcn.004034f8
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
call fcn.00403428
push eax
push 0
push 0
push edi
push esi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x40b707
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
call fcn.004031cc
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40b724
lea eax, [ebp - 0x10]
call fcn.0040317c
ret
Function at 0x40bdec
Capabilities:
Shutdown system

Disassembly:
add esp, 0xffffffec
cmp dword [0x40d07c], 2
jne 0x40be59
push esp
push 0x28
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
test eax, eax
jne 0x40be11
call fcn.0040bdcc
jmp 0x40be6b
lea eax, [esp + 8]
push eax
push 0x40be70
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 0x40be59
call fcn.0040bdcc
jmp 0x40be6b
push 0
push 2
call sub.user32.dll_ExitWindowsEx
test eax, eax
jne 0x40be6b
call fcn.0040bdcc
add esp, 0x14
ret

Function at 0x40be84
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebx
push esi
push edi
mov edi, eax
mov ebx, edx
dec ebx
test ebx, ebx
jl 0x40beca
inc ebx
xor esi, esi
test esi, esi
je 0x40bea1
push 0xfa
call sub.kernel32.dll_Sleep
mov eax, edi
call fcn.0040341c
push eax
call sub.kernel32.dll_DeleteFileA
test eax, eax
jne 0x40beca
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x40beca
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x40beca
inc esi
dec ebx
jne 0x40be93
pop edi
pop esi
pop ebx
ret

Function at 0x40c270
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff84
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
lea ebx, [ebp - 0x78]
xor eax, eax
push ebp
push 0x40c372
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x7c]
mov eax, esi
call fcn.0040b50c
push dword [ebp - 0x7c]
push 0x40c388
push edi
lea eax, [ebp - 8]
mov edx, 3
call fcn.00403318
lea eax, [ebp - 0x4c]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x4c], 0x44
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x4c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 8]
call fcn.0040341c
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x40c2fe
mov al, 0x5a
call fcn.0040bed0
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x40c315
push ebx
call sub.user32.dll_TranslateMessage
push ebx
call sub.user32.dll_DispatchMessageA
push 1
push 0
push 0
push 0
push ebx
call sub.user32.dll_PeekMessageA
test eax, eax
jne 0x40c309
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x5c]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x40c315
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x5c]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x5c]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c379
lea eax, [ebp - 0x7c]
call fcn.0040317c
lea eax, [ebp - 8]
call fcn.0040317c
ret