joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403590
Capabilities:
Create directory
Enumerate files on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
push ebx
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
push 0
push 0
push 0x64
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x4035ca
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0040100f
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x403618
push 0xa
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x150]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x154], eax
cmp dword [ebp - 0x154], 0xffffffff
je 0x403609
push 0
lea edx, [ebp - 0x124]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0
mov eax, dword [ebp - 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp dword [ebp - 4], 0
je 0x40364b
mov ecx, dword [0x465e60]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0xc]
push ecx
pop edx
mov ecx, edx
push ecx
xor ecx, 0xc
pop ecx
mov edx, ecx
push edx
shl edx, 3
mov eax, ecx
xor ecx, edx
push eax
pop edx
nop
pop ebx
mov ebx, ebx
mov eax, dword [ebp - 4]
push eax
call ebx
xor edx, ecx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4037c1
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x44], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0xec], eax
mov dword [ebp - 0x30], 0xefafdc02
mov dword [ebp - 0x44], 0xefafdc03
mov dword [ebp - 0x20], 0x8a645fd3
mov dword [ebp - 0x10], 0xd8fa8af3
mov edx, dword [ebp - 8]
cmp dword [edx + 0xec], 0
je 0x403901
mov dword [ebp - 0x48], 0
mov dword [ebp - 0xc], 0xa030
mov dword [ebp - 4], 0xb193dffa
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0xec]
add ecx, dword [ebp - 0xc]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 4]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x34]
mov dword [eax + 0x108], ecx
push 4
lea edx, [ebp - 0x50]
push edx
mov eax, dword [ebp - 8]
add eax, 0x94
push eax
call fcn.004010d0
add esp, 0xc
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x44]
mov dword [ecx + 0xf0], edx
mov eax, dword [ebp - 8]
cmp dword [eax + 0xec], 0
jne 0x4038b6
jmp 0x4038bc
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xec]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov dword [ecx + 0xb4], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x30]
mov dword [eax + 0xe8], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x2c]
mov dword [edx + 0x1a4], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x20]
mov dword [ecx + 4], edx
mov dword [ebp - 0x38], 0x8764efd3
jmp 0x403909
push 0xa
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xec]
mov dword [ecx + 0xc], eax
mov dword [ebp - 0x40], 0
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x38]
mov dword [ecx + 0x15c], edx
mov eax, dword [ebp - 8]
mov dword [eax + 0xc8], 0x7654fde1
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0xec], 0
jbe 0x403961
mov dword [ebp - 0x40], 0xb
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.0040111e
add esp, 8
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x40398f
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x408120
call fcn.00404720
mov edi, 0x94
mov eax, edi
call fcn.00404770
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x465e7c], ecx
mov eax, dword [esi + 4]
mov dword [0x465e88], eax
mov edx, dword [esi + 8]
mov dword [0x465e8c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x465e80], esi
cmp ecx, 2
je 0x4039ef
or esi, 0x8000
mov dword [0x465e80], esi
shl eax, 8
add eax, edx
mov dword [0x465e84], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x403a2a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x403a2a
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x403a42
cmp eax, 0x20b
je 0x403a2f
mov dword [ebp - 0x1c], esi
jmp 0x403a56
cmp dword [ecx + 0x84], 0xe
jbe 0x403a2a
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x403a50
cmp dword [ecx + 0x74], 0xe
jbe 0x403a2a
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.004046cd
pop ecx
test eax, eax
jne 0x403a82
cmp dword [0x465e6c], 1
jne 0x403a6f
call fcn.00403e76
push 0x1c
call fcn.00403cff
push 0xff
call fcn.00403b68
pop ecx
pop ecx
call fcn.0040462b
mov dword [ebp - 4], esi
call fcn.00404480
test eax, eax
jge 0x403a9b
push 0x1b
call fcn.0040396a
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4663b4], eax
call fcn.0040435e
mov dword [0x465e64], eax
call fcn.004042bc
test eax, eax
jge 0x403ac1
push 8
call fcn.0040396a
pop ecx
call fcn.00404089
test eax, eax
jge 0x403ad2
push 9
call fcn.0040396a
pop ecx
call fcn.00403b98
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x403ae5
push eax
call fcn.0040396a
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00404020
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x403b06
movzx eax, word [ebp - 0x34]
jmp 0x403b09
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.00403590
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x403b27
push edi
call fcn.00403cbf
call fcn.00403ce1
jmp 0x403b59
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040475b
ret
Function at 0x403bfd
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x465ebc], esi
push edi
jne 0x403c1d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x465eb8], esi
mov byte [0x465eb4], al
jne 0x403c83
mov ecx, dword [0x4663a8]
test ecx, ecx
je 0x403c64
mov eax, dword [0x4663a4]
sub eax, 4
cmp eax, ecx
jmp 0x403c5d
mov eax, dword [eax]
test eax, eax
je 0x403c4f
call eax
mov eax, dword [0x4663a4]
sub eax, 4
cmp eax, dword [0x4663a8]
mov dword [0x4663a4], eax
jae 0x403c47
mov eax, 0x40a01c
mov esi, 0x40a020
cmp eax, esi
mov edi, eax
jae 0x403c83
mov eax, dword [edi]
test eax, eax
je 0x403c7c
call eax
add edi, 4
cmp edi, esi
jb 0x403c74
mov eax, 0x40a024
mov esi, 0x40a028
cmp eax, esi
mov edi, eax
jae 0x403ca2
mov eax, dword [edi]
test eax, eax
je 0x403c9b
call eax
add edi, 4
cmp edi, esi
jb 0x403c93
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x403cbd
push dword [ebp + 8]
mov dword [0x465ebc], 1
call fcn.00403b68
pop ecx
pop ebp
ret

Function at 0x403cff
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x465d20]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x465bf0]
je 0x403d2c
inc eax
cmp eax, 0x12
jb 0x403d1d
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x465bf0]
jne 0x403e60
mov eax, dword [0x465e6c]
cmp eax, 1
je 0x403e3b
cmp eax, edx
jne 0x403d5c
cmp dword [0x465be8], 1
je 0x403e3b
cmp ecx, 0xfc
je 0x403e60
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403d95
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.00404970
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.00404ba0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x403dd7
lea eax, [ebp - 0x10c]
push eax
call fcn.00404ba0
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x408490
push edi
call fcn.00404a70
add esp, 0x10
push edi
call fcn.00404ba0
push dword [esi + 0x465bf4]
mov ebx, eax
call fcn.00404ba0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00404770
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00404970
push edi
push ebx
call fcn.00404980
push 0x408470
push ebx
call fcn.00404980
push dword [esi + 0x465bf4]
push ebx
call fcn.00404980
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00404869
add esp, 0x2c
jmp 0x403e60
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x465bf4]
push dword [esi]
call fcn.00404ba0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.00404c5c
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404869
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x465fd4], ebx
push esi
push edi
jne 0x4048e9
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x404924
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x465fd4], eax
je 0x404924
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x465fd8], eax
call esi
cmp dword [0x465e7c], 2
mov dword [0x465fdc], eax
jne 0x4048e9
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x465fe4], eax
je 0x4048e9
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x465fe0], eax
mov eax, dword [0x465fe0]
test eax, eax
je 0x40492e
call eax
test eax, eax
je 0x404915
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x465fe4]
test eax, eax
je 0x404915
test byte [ebp - 8], 1
jne 0x40492e
cmp dword [0x465e88], 4
jb 0x404928
or byte [ebp + 0x12], 0x20
jmp 0x40494d
xor eax, eax
jmp 0x40495d
or byte [ebp + 0x12], 4
jmp 0x40494d
mov eax, dword [0x465fd8]
test eax, eax
je 0x40494d
call eax
mov ebx, eax
test ebx, ebx
je 0x40494d
mov eax, dword [0x465fdc]
test eax, eax
je 0x40494d
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x465fd4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x407018
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.00404770
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4070ad
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x465e7c]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x4070ad
cmp eax, 1
je 0x4070c5
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4070ad
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x407082
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x4070a9
xor eax, eax
inc eax
jmp 0x4070e1
cmp esi, ebx
jae 0x4070b1
xor eax, eax
jmp 0x4070e1
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x465e7c]
jmp 0x4070c7
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40654f
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
cmp eax, 8
ja case.0x40655f.1
jmp dword [eax*4 + 0x406647]
push dword [ebp + 0xc]
call fcn.0040666b
and dword [0x42a16c], 0
jmp case.0x40655f.1
mov eax, dword [0x42a16c]
xor ecx, ecx
cmp ecx, dword [ebp + 0x14]
ja case.0x40655f.1
mov esi, dword [ebp + 0x10]
jb 0x406597
cmp eax, esi
jae case.0x40655f.1
call fcn.00406a06
add dword [0x42a16c], 0x100000
xor eax, eax
cmp eax, dword [ebp + 0x14]
jb 0x406597
ja case.0x40655f.1
cmp dword [0x42a16c], esi
jb 0x406597
jmp case.0x40655f.1
push dword [ebp + 0xc]
call fcn.0040666b
call fcn.00406a06
jmp case.0x40655f.1
call fcn.00406a06
push 0x80
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp + 0xc]
call fcn.00406719
mov esi, eax
test esi, esi
jns case.0x40655f.1
push 0x403a2c
jmp 0x406635
mov eax, dword [0x42a16c]
xor ecx, ecx
cmp ecx, dword [ebp + 0x14]
ja case.0x40655f.1
mov esi, dword [ebp + 0x10]
jb 0x406605
cmp eax, esi
jae case.0x40655f.1
call fcn.00406a06
add dword [0x42a16c], 0x80000
xor eax, eax
cmp eax, dword [ebp + 0x14]
jb 0x406605
ja case.0x40655f.1
cmp dword [0x42a16c], esi
jb 0x406605
call fcn.00406a34
mov esi, eax
test esi, esi
jns 0x40663d
push 0x4039b4
push esi
call fcn.004088ec
pop ecx
pop ecx
mov eax, esi
pop esi
pop ebp
ret 0x14
Function at 0x4067d3
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
xor esi, esi
mov dword [ebp - 4], esi
cmp dword [0x42a108], esi
je 0x4067ef
mov eax, 0x8000ffff
jmp 0x406953
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
push ebx
xor ebx, ebx
inc ebx
push edi
mov dword [0x42a114], eax
cmp eax, esi
jne 0x4068fd
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x1f4
mov dword [0x42a0f0], eax
push eax
mov eax, 0x42a104
call fcn.00409475
push 0x429f10
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push esi
push esi
push esi
push esi
mov dword [0x42a0fc], ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [0x42a100], eax
cmp eax, esi
jne 0x406874
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp eax, esi
jle 0x406861
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
cmp dword [ebp - 4], esi
jl 0x40686d
mov dword [ebp - 4], 0x80004005
push 0x403acc
jmp 0x4068b8
push esi
push esi
push esi
push 0x406a65
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x42a0f4], eax
cmp eax, esi
jne 0x4068c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp eax, esi
jle 0x4068a7
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
cmp dword [ebp - 4], esi
jl 0x4068b3
mov dword [ebp - 4], 0x80004005
push 0x403b08
push dword [ebp - 4]
call fcn.004088ec
pop ecx
pop ecx
jmp 0x406903
push 0xffffffffffffffff
push dword [0x42a100]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
movzx eax, word [ebp + 0xc]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
shl eax, 0x10
push eax
push esi
push 0x401
push dword [0x42a0f8]
call edi
push esi
push ebx
push 0x404
push dword [0x42a0f8]
call edi
mov dword [0x42a108], ebx
cmp dword [ebp - 4], esi
jge 0x40694e
cmp dword [0x42a0fc], esi
je 0x406921
push 0x429f10
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [0x42a0fc], esi
mov eax, dword [0x42a104]
cmp eax, esi
je 0x406930
push eax
call fcn.004091af
mov eax, dword [0x42a0f4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, esi
je 0x406942
push eax
call edi
mov eax, dword [0x42a100]
cmp eax, esi
je 0x40694e
push eax
call edi
mov eax, dword [ebp - 4]
pop edi
pop ebx
pop esi
leave
ret 8
Function at 0x40791e
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x428050]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x24], eax
xor eax, eax
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0xf0000000
xor ebx, ebx
stosd dword es:[edi], eax
push 1
push ebx
stosd dword es:[edi], eax
push ebx
lea eax, [ebp - 0x20]
push eax
xor esi, esi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40798c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x40797b
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x407982
mov esi, 0x80004005
push 0x40428c
jmp 0x407a4e
lea eax, [ebp - 0x14]
push eax
push 0x10
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x4079ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x4079b9
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x4079c0
mov esi, 0x80004005
push 0x4042b0
jmp 0x407a4e
mov bl, byte [ebp - 0x14]
mov edi, dword [ebp - 0x24]
and bl, 7
add bl, 9
add bl, bl
mov dword [edi], esi
mov byte [ebp - 0x15], 0
je 0x407a56
movzx eax, byte [ebp - 0x15]
and dword [ebp - 0x1c], 0
shr eax, 1
movzx eax, byte [ebp + eax - 0x14]
push eax
lea eax, [ebp - 0x1c]
push 0x4042d4
push eax
call fcn.00408ee1
mov esi, eax
add esp, 0xc
test esi, esi
js 0x407a42
cmp dword [edi], 0
jne 0x407a13
mov eax, dword [ebp - 0x1c]
mov dword [edi], eax
jmp 0x407a33
push 0
push dword [ebp - 0x1c]
mov eax, edi
call fcn.00408e25
mov esi, eax
test esi, esi
js 0x407a49
cmp dword [ebp - 0x1c], 0
je 0x407a33
push dword [ebp - 0x1c]
call fcn.004091af
add byte [ebp - 0x15], 2
and dword [ebp - 0x1c], 0
cmp byte [ebp - 0x15], bl
jb 0x4079e0
jmp 0x407a56
push 0x4042e0
jmp 0x407a4e
push 0x404320
push esi
call fcn.004088ec
pop ecx
pop ecx
xor edi, edi
cmp dword [ebp - 0x20], edi
je 0x407a67
push edi
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp dword [ebp - 0x1c], edi
je 0x407a74
push dword [ebp - 0x1c]
call fcn.004091af
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00418955
leave
ret 4
Function at 0x407a87
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
mov eax, dword [0x428050]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor eax, eax
lea edi, [ebp - 0xa]
stosd dword es:[edi], eax
mov ax, word [ecx]
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 8], ax
mov word [ebp - 0x80c], ax
lea eax, [ebp - 0x80a]
push eax
call fcn.0041d340
add esp, 0xc
mov esi, 0x400
push esi
lea eax, [ebp - 0x80c]
push eax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
jne 0x407af1
xor al, al
jmp 0x407b2f
lea eax, [ebp - 0x80c]
push esi
push eax
call fcn.00418c75
lea eax, [ebp - 0x80c]
push 0x404360
push eax
call fcn.00418c8c
add esp, 0x10
test eax, eax
jne 0x407b2d
lea eax, [ebp - 0x80c]
push 0x404374
push eax
call fcn.00418c8c
pop ecx
pop ecx
test eax, eax
je 0x407aed
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00418955
leave
ret
Function at 0x407df6
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x428050]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov esi, 0x404680
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push eax
mov dword [ebp - 0x38], eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
push 6
mov dword [ebx], eax
pop ecx
xor eax, eax
xor esi, esi
lea edi, [ebp - 0x34]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push esi
mov dword [ebp - 0x40], esi
call edi
mov dword [ebp - 0x3c], eax
or eax, 1
push eax
call edi
mov eax, dword [ebx]
dec eax
dec eax
je 0x407e5b
dec eax
je 0x407eb5
sub eax, 3
jne 0x407e83
mov dword [ebx], 3
jmp 0x407eb5
mov eax, dword [ebp - 0x38]
mov ax, word [eax]
push esi
push esi
push 3
push esi
push 3
mov word [ebp - 0x10], ax
push SysReAllocString
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x38], eax
cmp eax, 0xffffffff
jne 0x407e87
mov dword [ebx], esi
jmp 0x407eb5
push esi
lea ecx, [ebp - 0x40]
push ecx
push 0x18
lea ecx, [ebp - 0x34]
push ecx
push esi
push esi
push 0x70000
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x407eaa
cmp dword [ebp - 0x2c], 0xb
je 0x407eb5
push dword [ebp - 0x38]
mov dword [ebx], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x3c]
call edi
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.00418955
leave
ret 4
Function at 0x407ecc
Capabilities:
Create directory
Delete directory
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
xor ebx, ebx
push ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
call edi
mov dword [ebp - 0x14], eax
or eax, 1
push eax
call edi
mov dword [ebp - 0xc], ebx
lea eax, [ebp - 4]
push eax
call fcn.00407872
mov esi, eax
cmp esi, ebx
jl 0x407fcf
push dword [ebp - 4]
lea eax, [ebp - 8]
push dword [ebp + 8]
push 0x4046b0
push eax
call fcn.00408ee1
mov esi, eax
add esp, 0x10
cmp esi, ebx
jl 0x407fd6
push dword [ebp - 8]
lea esi, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
call fcn.00409b07
mov esi, eax
cmp esi, ebx
jl 0x407fdd
mov esi, dword [ebp - 0x10]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x407f65
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x407f65
push 4
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp esi, ebx
je 0x407f6f
push esi
call fcn.004091af
cmp dword [ebp - 4], ebx
je 0x407f7c
push dword [ebp - 4]
call fcn.004091af
cmp dword [ebp - 8], ebx
je 0x407f89
push dword [ebp - 8]
call fcn.004091af
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
cmp dword [ebp - 0x10], ebx
jne 0x407fec
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x3e8
jl 0x407ef2
xor esi, esi
inc esi
cmp dword [ebp - 4], ebx
je 0x407fb4
push dword [ebp - 4]
call fcn.004091af
cmp dword [ebp - 8], ebx
je 0x407fc1
push dword [ebp - 8]
call fcn.004091af
push dword [ebp - 0x14]
call edi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4
push 0x404690
jmp 0x407fe2
push 0x4046bc
jmp 0x407fe2
push 0x4046e8
push esi
call fcn.004088ec
pop ecx
pop ecx
jmp 0x407fa7
xor esi, esi
jmp 0x407fc1