joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a74b
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x40a7df
xor eax, eax
cmp word [esi], ax
je 0x40a7df
push ebx
push eax
push 0x80
push 3
push eax
push 1
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40a7de
push edi
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
mov edi, dword [ebp + 0x14]
test eax, eax
je 0x40a7cb
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 8], eax
mov dword [ebp - 4], ecx
test edi, 0x100
ja 0x40a7bd
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea eax, [ebp - 8]
push eax
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and edi, 0x27
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop edi
pop ebx
pop esi
leave
ret 0x10

Function at 0x40cdbf
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0x3c
mov eax, 0x48e7d9
call fcn.00458f67
mov esi, dword [ebp + 8]
mov ecx, esi
push 0x4b5994
call fcn.0040d1ca
test al, al
jne 0x40cee3
push 0x4b5998
mov ecx, esi
call fcn.0040d1ca
test al, al
jne 0x40cee3
push 8
pop edi
mov eax, esi
cmp dword [esi + 0x14], edi
jb 0x40ce02
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x44], eax
cmp eax, 0xffffffff
je 0x40cee3
test al, 0x10
je 0x40cee3
xor ebx, ebx
lea ecx, [ebp - 0x28]
push esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
call fcn.00403c5b
push 0x4947c0
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], ebx
call fcn.004067dc
cmp dword [ebp - 0x14], edi
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x40]
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.004066f6
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 1
push 1
push eax
call fcn.0040ceeb
pop ecx
pop ecx
lea ecx, [ebp - 0x40]
mov bl, al
call fcn.00403bdf
test bl, bl
jne 0x40ce74
xor ebx, ebx
jmp 0x40cea3
mov eax, dword [ebp - 0x44]
mov ecx, esi
and eax, 0xfffffffe
cmp dword [esi + 0x14], edi
jb 0x40ce83
mov ecx, dword [esi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esi + 0x14], edi
jb 0x40ce92
mov esi, dword [esi]
push 4
xor ebx, ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
setne bl
mov eax, dword [ebp - 0x14]
cmp eax, edi
jb 0x40cedf
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ecx
cmp eax, 0x1000
jb 0x40ced6
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00403184
mov eax, dword [ebp - 0x48]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x44]
push eax
push ecx
call fcn.00458ecf
pop ecx
pop ecx
mov al, bl
jmp 0x40cee5
xor al, al
call fcn.00458f11
ret
Function at 0x40da85
Capabilities:
Delete directory
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x40db58
xor eax, eax
cmp ax, word [esi]
je 0x40db58
push esi
call fcn.0045ef01
pop ecx
cmp eax, 3
jbe 0x40db58
push edi
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.0045b1d0
push 0x494b44
push esi
push 0x494b38
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00401480
push dword [ebp + 0xc]
lea eax, [ebp - 0x20c]
push eax
call fcn.0040db67
add esp, 0x28
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x40db53
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x40db32
cmp eax, 0x91
jne 0x40db53
push 1
push 0
push esi
call fcn.0040dd17
add esp, 0xc
neg eax
sbb eax, eax
inc eax
test edi, edi
je 0x40db51
test eax, eax
je 0x40db51
xor edi, edi
inc edi
jmp 0x40db53
xor edi, edi
mov eax, edi
pop edi
jmp 0x40db5a
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00458eeb
leave
ret
Function at 0x40db67
Capabilities:
Delete file
Enumerate files on windows
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x460
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x45c]
push edi
push 0x250
push 0
push eax
call fcn.0045b1d0
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.0045b1d0
add esp, 0x18
test esi, esi
je 0x40dd06
xor eax, eax
cmp ax, word [esi]
je 0x40dd06
push esi
call fcn.0045ef01
pop ecx
cmp eax, 3
jbe 0x40dd06
push esi
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.00401380
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.0045b45b
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x40dd06
lea eax, [ebp - 0x45c]
add ebx, 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40dd06
lea eax, [ebp - 0x20c]
mov ecx, ebx
sub ecx, eax
xor esi, esi
sar ecx, 1
mov eax, 0x104
inc esi
sub eax, ecx
mov dword [ebp - 0x460], eax
lea ecx, [ebp - 0x430]
push ecx
push eax
push ebx
call fcn.00401380
test byte [ebp - 0x45c], 0x10
je 0x40dc70
push 0x2e
pop eax
cmp ax, word [ebp - 0x430]
je 0x40dcdb
cmp dword [ebp + 0xc], 0
je 0x40dcdb
push dword [ebp + 0xc]
lea eax, [ebp - 0x20c]
push eax
call fcn.0040da85
pop ecx
pop ecx
jmp 0x40dccc
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40dcdb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xf
je 0x40dcdb
cmp eax, 2
je 0x40dcdb
cmp eax, 3
je 0x40dcdb
push 1
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.0040dd17
add esp, 0xc
neg eax
sbb eax, eax
inc eax
test esi, esi
je 0x40dcd9
test eax, eax
je 0x40dcd9
xor esi, esi
inc esi
jmp 0x40dcdb
xor esi, esi
lea eax, [ebp - 0x45c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
mov eax, dword [ebp - 0x460]
jne 0x40dc30
test edi, edi
je 0x40dd02
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, esi
jmp 0x40dd08
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00458eeb
leave
ret
Function at 0x40dfad
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x940
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x938], eax
mov esi, 0x104
mov eax, dword [ebp + 0xc]
xor ebx, ebx
push esi
mov dword [ebp - 0x93c], eax
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.0045b1d0
add esp, 0xc
lea eax, [ebp - 0x108]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x40e14b
push str.WinInit.Ini
push esi
lea eax, [ebp - 0x108]
push eax
call fcn.0040e304
push ebx
push 0x8000080
push 4
push ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40e142
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x934], eax
test eax, eax
je 0x40e0d3
lea ecx, [eax + 1]
mov dword [ebp - 0x92c], ebx
push ecx
lea ecx, [ebp - 0x92c]
call fcn.0040d8ea
mov edi, dword [ebp - 0x92c]
test al, al
je 0x40e1df
push ebx
lea eax, [ebp - 0x930]
mov dword [ebp - 0x930], ebx
push eax
push dword [ebp - 0x934]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40e1df
mov eax, dword [ebp - 0x930]
push str._Rename_
push edi
mov byte [eax + edi], bl
call fcn.0045bb60
pop ecx
pop ecx
test eax, eax
jne 0x40e159
push str._rename_
push edi
call fcn.0045bb60
pop ecx
pop ecx
test eax, eax
jne 0x40e159
push edi
call fcn.0045f1d9
pop ecx
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, 0x410
lea eax, [ebp - 0x928]
push edi
push ebx
push eax
call fcn.0045b1d0
push dword [ebp - 0x938]
lea eax, [ebp - 0x928]
push dword [ebp - 0x93c]
push str._r_n_rename__r_n_s_s_r_n
push edi
push eax
call fcn.0040e396
lea eax, [ebp - 0x928]
mov dword [ebp - 0x940], ebx
push eax
call fcn.00461890
add esp, 0x24
lea ecx, [ebp - 0x940]
push ebx
push ecx
push eax
lea eax, [ebp - 0x928]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
pop edi
test esi, esi
je 0x40e149
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00458eeb
leave
ret
push 2
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x410
lea eax, [ebp - 0x518]
push ebx
push eax
call fcn.0045b1d0
mov ecx, dword [ebp - 0x934]
mov edx, str._s_s_r_n
push dword [ebp - 0x938]
mov eax, str._r_n_s_s_r_n
push dword [ebp - 0x93c]
cmp byte [edi + ecx - 1], 0xa
cmove eax, edx
push eax
lea eax, [ebp - 0x518]
push 0x410
push eax
call fcn.0040e396
lea eax, [ebp - 0x518]
mov dword [ebp - 0x92c], ebx
push eax
call fcn.00461890
add esp, 0x24
lea ecx, [ebp - 0x92c]
push ebx
push ecx
push eax
lea eax, [ebp - 0x518]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e1df
xor ebx, ebx
inc ebx
push edi
call fcn.0045f1d9
pop ecx
jmp 0x40e13d
Function at 0x40f2fd
Capabilities:
Get common file path

Disassembly:
push 0x130
mov eax, 0x48eafe
call fcn.00458f67
mov esi, 0x104
lea eax, [ebp - 0x114]
push esi
xor edi, edi
push edi
push eax
call fcn.0045b1d0
add esp, 0xc
lea eax, [ebp - 0x114]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp byte [0x4c34cc], 0
jne 0x40f4f5
lea eax, [ebp - 0x118]
push eax
call fcn.0040f96f
pop ecx
push eax
mov ecx, 0x4c3494
mov dword [ebp - 4], edi
call fcn.0040d89a
mov ecx, dword [ebp - 0x118]
or esi, 0xffffffff
mov dword [ebp - 4], esi
lea ecx, [ecx - 0x10]
call fcn.0040c5fb
lea eax, [ebp - 0x118]
push eax
call fcn.0040f5f0
pop ecx
push eax
mov ecx, 0x4c3498
mov dword [ebp - 4], 1
call fcn.0040d89a
mov ecx, dword [ebp - 0x118]
mov dword [ebp - 4], esi
lea ecx, [ecx - 0x10]
call fcn.0040c5fb
lea eax, [ebp - 0x118]
push eax
call fcn.0040f656
pop ecx
push eax
mov ecx, 0x4c349c
mov dword [ebp - 4], 2
call fcn.0040d89a
mov ecx, dword [ebp - 0x118]
mov dword [ebp - 4], esi
lea ecx, [ecx - 0x10]
call fcn.0040c5fb
lea eax, [ebp - 0x118]
push eax
call fcn.0040f7f7
pop ecx
push eax
mov ecx, 0x4c34a0
mov dword [ebp - 4], 3
call fcn.0040d89a
mov ecx, dword [ebp - 0x118]
mov dword [ebp - 4], esi
lea ecx, [ecx - 0x10]
call fcn.0040c5fb
lea eax, [ebp - 0x118]
push eax
call fcn.0040f8a3
pop ecx
push eax
mov ecx, 0x4c34a4
mov dword [ebp - 4], 4
call fcn.0040d89a
mov ecx, dword [ebp - 0x118]
mov dword [ebp - 4], esi
lea ecx, [ecx - 0x10]
call fcn.0040c5fb
lea eax, [ebp - 0x118]
push eax
call fcn.0040f67f
pop ecx
push eax
mov ecx, 0x4c34a8
mov dword [ebp - 4], 5
call fcn.0040d89a
mov ecx, dword [ebp - 0x118]
mov dword [ebp - 4], esi
lea ecx, [ecx - 0x10]
call fcn.0040c5fb
lea eax, [ebp - 0x118]
push eax
call fcn.0040f72b
pop ecx
push eax
mov ecx, 0x4c34ac
mov dword [ebp - 4], 6
call fcn.0040d89a
mov ecx, dword [ebp - 0x118]
mov dword [ebp - 4], esi
lea ecx, [ecx - 0x10]
call fcn.0040c5fb
lea eax, [ebp - 0x118]
push eax
call fcn.0040f791
pop ecx
push eax
mov ecx, 0x4c34b0
mov dword [ebp - 4], 7
call fcn.0040d89a
mov ecx, dword [ebp - 0x118]
mov dword [ebp - 4], esi
lea ecx, [ecx - 0x10]
call fcn.0040c5fb
lea eax, [ebp - 0x120]
push eax
call fcn.0040f909
pop ecx
push eax
mov ecx, 0x4c34b4
mov dword [ebp - 4], 8
call fcn.0040d89a
mov ecx, dword [ebp - 0x120]
mov dword [ebp - 4], esi
lea ecx, [ecx - 0x10]
call fcn.0040c5fb
mov byte [0x4c34cc], 1
cmp dword [ebp + 8], 0
je 0x40f573
cmp dword [ebp + 0xc], 0
je 0x40f573
cmp dword [ebp + 0x10], 0
je 0x40f573
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x128], eax
lea ecx, [ebp - 0x13c]
lea eax, [ebp - 0x114]
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x13c], eax
lea eax, [ebp + 8]
mov dword [ebp - 0x138], eax
lea eax, [ebp + 0xc]
mov dword [ebp - 0x134], eax
lea eax, [ebp + 0x10]
mov dword [ebp - 0x130], eax
lea eax, [ebp - 0x128]
push edi
mov dword [ebp - 0x12c], eax
call fcn.0040ef35
push 1
lea ecx, [ebp - 0x13c]
call fcn.0040ef35
mov eax, dword [ebp - 0x11c]
jmp 0x40f576
push 0xb
pop eax
call fcn.00458f11
ret
Function at 0x40f5f0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push edi
mov edi, 0x104
mov dword [ebp - 0x10c], esi
push edi
push 0
push eax
call fcn.0045b1d0
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push eax
push str.ALLUSERSPROFILE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x108]
mov ecx, esi
push eax
call fcn.0040d7d2
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.00458eeb
leave
ret

Function at 0x40f67f
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x110
mov eax, 0x48eb38
call fcn.00458f67
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x114]
mov edi, 0x104
mov dword [ebp - 0x11c], esi
push edi
xor ebx, ebx
push ebx
push eax
call fcn.0045b1d0
add esp, 0xc
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x118], ebx
lea eax, [ebp - 0x118]
mov dword [ebp - 4], ebx
push eax
push 0x101
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40f700
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x114]
push eax
push ebx
push ebx
push str.CommonFilesDir
push dword [ebp - 0x118]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x114]
mov ecx, esi
push eax
call fcn.0040d7d2
cmp dword [ebp - 0x118], 0
je 0x40f723
push dword [ebp - 0x118]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
call fcn.00458f11
ret

Function at 0x40f72b
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push edi
mov edi, 0x104
mov dword [ebp - 0x10c], esi
push edi
push 0
push eax
call fcn.0045b1d0
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push eax
push str.CommonProgramFiles_x86_
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x108]
mov ecx, esi
push eax
call fcn.0040d7d2
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.00458eeb
leave
ret

Function at 0x40f791
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push edi
mov edi, 0x104
mov dword [ebp - 0x10c], esi
push edi
push 0
push eax
call fcn.0045b1d0
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push eax
push str.CommonProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x108]
mov ecx, esi
push eax
call fcn.0040d7d2
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.00458eeb
leave
ret
Function at 0x40f7f7
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x110
mov eax, 0x48eb38
call fcn.00458f67
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x114]
mov edi, 0x104
mov dword [ebp - 0x11c], esi
push edi
xor ebx, ebx
push ebx
push eax
call fcn.0045b1d0
add esp, 0xc
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x118], ebx
lea eax, [ebp - 0x118]
mov dword [ebp - 4], ebx
push eax
push 0x101
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40f878
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x114]
push eax
push ebx
push ebx
push str.ProgramFilesDir
push dword [ebp - 0x118]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x114]
mov ecx, esi
push eax
call fcn.0040d7d2
cmp dword [ebp - 0x118], 0
je 0x40f89b
push dword [ebp - 0x118]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
call fcn.00458f11
ret

Function at 0x40f8a3
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push edi
mov edi, 0x104
mov dword [ebp - 0x10c], esi
push edi
push 0
push eax
call fcn.0045b1d0
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push eax
push str.ProgramFiles_x86_
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x108]
mov ecx, esi
push eax
call fcn.0040d7d2
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.00458eeb
leave
ret

Function at 0x40f909
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push edi
mov edi, 0x104
mov dword [ebp - 0x10c], esi
push edi
push 0
push eax
call fcn.0045b1d0
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push eax
push str.ProgramW6432
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x108]
mov ecx, esi
push eax
call fcn.0040d7d2
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.00458eeb
leave
ret

Function at 0x40f96f
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push edi
mov edi, 0x104
mov dword [ebp - 0x10c], esi
push edi
push 0
push eax
call fcn.0045b1d0
add esp, 0xc
lea eax, [ebp - 0x108]
push edi
push eax
push str.SystemRoot
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x108]
mov ecx, esi
push eax
call fcn.0040d7d2
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.00458eeb
leave
ret
Function at 0x40feda
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
xor ebx, ebx
xor eax, eax
and dword [ebp - 0xc], ebx
and dword [ebp - 0x10], ebx
push edi
mov edi, ecx
mov dword [ebp - 8], ebx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
push 0x57
pop esi
test ecx, ecx
je 0x40ffbb
cmp byte [ecx], al
je 0x40ffbb
push dword [ebp + 8]
mov ecx, edi
call fcn.0041206f
test eax, eax
je 0x40ffb9
cmp dword [edi + 0x18], ebx
jne 0x40ff29
mov ecx, edi
call fcn.00411beb
cmp dword [edi + 0xbc], ebx
je 0x40ff50
push 0x20000
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor edx, edx
mov ecx, ebx
inc edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 4], ecx
lea eax, [ebp - 8]
mov ecx, edi
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0041142c
mov esi, eax
mov dword [ebp + 0xc], esi
test esi, esi
jne 0x40ffaf
push 2
push ebx
push ebx
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
mov ebx, dword [ebp - 8]
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
dec eax
push eax
push ebx
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push ebx
mov ecx, edi
mov esi, eax
call fcn.00412028
test esi, esi
jne 0x40ffb4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 4]
jmp 0x40ffbb
mov ebx, dword [ebp - 8]
jmp 0x40ffaa
mov esi, dword [ebp + 0xc]
jmp 0x40ffaa
mov eax, ebx
cmp dword [edi + 0xbc], 0
je 0x40ffda
test eax, eax
je 0x40ffda
push 0x10000
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test ebx, ebx
je 0x40ffe5
push ebx
call fcn.0045f1d9
pop ecx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8
Function at 0x410221
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x410330
xor ebx, ebx
cmp word [esi], bx
je 0x410330
push esi
call fcn.00411a90
pop ecx
test eax, eax
je 0x410261
mov eax, 0xb7
jmp 0x410333
push edi
mov edi, 0x208
lea eax, [ebp - 0x414]
push edi
push ebx
push eax
call fcn.0045b1d0
add esp, 0xc
lea eax, [ebp - 0x414]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push edi
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.0045b1d0
push 0x5c
push esi
call fcn.0045bf27
add esp, 0x14
pop edi
test eax, eax
je 0x4102f7
cmp eax, esi
jne 0x4102dc
mov ax, word [ebp - 0x414]
mov word [ebp - 0x20c], ax
mov ax, word [ebp - 0x412]
push esi
mov word [ebp - 0x20a], ax
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00401410
jmp 0x410318
cmp word [esi + 2], 0x3a
jne 0x4102f7
push esi
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.00401380
jmp 0x410318
push esi
lea eax, [ebp - 0x414]
push eax
push 0x494b38
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00401480
add esp, 0x14
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.00410341
neg eax
pop ecx
sbb eax, eax
pop ecx
and eax, 0x52
jmp 0x410333
push 0x57
pop eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00458eeb
leave
ret

Function at 0x410405
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x410441
push esi
call fcn.0045ef01
pop ecx
cmp eax, 3
jbe 0x410441
push esi
call fcn.0040f2c5
pop ecx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x41043d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x410444
xor eax, eax
jmp 0x410444
push 0x57
pop eax
pop esi
pop ebp
ret
Function at 0x411835
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x4c143c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, 0x9c
lea eax, [ebp - 0xa0]
push esi
push 0
push eax
mov ebx, ecx
call fcn.0045b1d0
push esi
lea eax, [ebp - 0xa0]
push 0
push eax
call fcn.0045b1d0
add esp, 0x18
mov dword [ebp - 0xa0], esi
lea eax, [ebp - 0xa0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov esi, eax
test esi, esi
jne 0x4118a6
lea eax, [ebp - 0xa0]
mov dword [ebp - 0xa0], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x411921
mov eax, dword [ebp - 0x90]
sub eax, 0
je 0x411921
sub eax, 1
je 0x411900
sub eax, 1
jne 0x411921
test esi, esi
je 0x4118c6
movzx eax, word [ebp - 0xc]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x9c]
cmp eax, 4
ja 0x4118d6
push 8
pop eax
jmp 0x411926
cmp eax, 5
jne 0x4118f5
cmp dword [ebp - 0x98], 0
jne 0x4118e8
push 0x10
jmp 0x4118d3
cmp dword [ebp - 0x98], 1
jb 0x411921
push 0x20
jmp 0x4118d3
cmp eax, 6
je 0x4118fc
jbe 0x411921
push 0x40
jmp 0x4118d3
cmp dword [ebp - 0x9c], 4
ja 0x411910
je 0x411910
xor eax, eax
inc eax
jmp 0x411926
cmp dword [ebp - 0x98], 0x5a
sbb eax, eax
and eax, 0xfffffffe
add eax, 4
jmp 0x411926
mov eax, 0x80000000
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00458eeb
leave
ret

Function at 0x411a90
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 8], 0
je 0x411ab0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x411ab0
test al, 0x10
je 0x411ab0
xor eax, eax
inc eax
pop ebp
ret
xor eax, eax
pop ebp
ret