joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40555a
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
and dword [ebp - 4], 0
lea ecx, [ebp - 8]
and dword [ebp - 0xc], 0
push ecx
lea ecx, [ebp - 0xc]
mov dword [ebp - 8], eax
push ecx
lea ecx, [ebp - 4]
push ecx
push eax
call fcn.0041037e
mov esi, eax
test esi, esi
js 0x405616
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
call fcn.0041037e
mov esi, eax
test esi, esi
jne 0x40560f
mov ebx, dword [ebp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
mov eax, dword [ebp - 4]
push 0x2f
pop edx
movzx ecx, word [eax]
cmp dx, cx
je 0x4055c9
push 0x2d
pop edx
cmp dx, cx
jne 0x40562e
lea esi, [eax + 2]
push esi
push str.standalone
call edi
test eax, eax
jne 0x4055e3
mov eax, dword [ebp + 0x10]
mov dword [eax], 1
jmp 0x4055f5
push esi
push str.standalone:temp
call edi
test eax, eax
jne 0x405635
mov dword [ebx], 1
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
call fcn.0041037e
mov esi, eax
test esi, esi
je 0x4055b3
xor eax, eax
test esi, esi
cmovns esi, eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x405623
push eax
call fcn.0040e61e
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov esi, 0x80070057
jmp 0x405619
push esi
push str.standalone:delete
call edi
mov esi, 0x80070057
jmp 0x405616
Function at 0x409a1f
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 8], ebx
cmp dword [edi + 0x44], ebx
je 0x409a3c
xor esi, esi
inc esi
jmp 0x409c11
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x409a8d
mov eax, dword [edi + 0xc]
lea edx, [ebp - 0xc]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov esi, eax
test esi, esi
js 0x409c11
lea eax, [ebp + 8]
push eax
push 2
push ebx
push dword [edi + 0x14]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x409c11
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], 1
mov eax, dword [edi + 0x48]
push 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 4
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push str.Size
push ecx
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x409c02
mov eax, dword [edi + 0x50]
push 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 4
push 0
push str.Progress
push dword [ebp + 8]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x409c02
push 4
lea eax, [edi + 0x74]
push eax
push 4
push 0
push str.LastAttemptHigh
push dword [ebp + 8]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x409c02
push 4
lea eax, [edi + 0x70]
push eax
push 4
push 0
push str.LastAttemptLow
push dword [ebp + 8]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x409c02
push 4
lea eax, [edi + 0x6c]
push eax
push 4
push 0
push str.LastError
push dword [ebp + 8]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x409c02
push 4
lea eax, [edi + 0x5c]
push eax
push 4
push 0
push str.StateCache
push dword [ebp + 8]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x409c02
push 4
lea eax, [edi + 0x60]
push eax
push 4
push 0
push str.StateExtract
push dword [ebp + 8]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x409c02
push 4
lea eax, [edi + 0x64]
push eax
push 4
push 0
push str.StateVerify
push dword [ebp + 8]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x409c02
push 4
lea eax, [edi + 0x68]
push eax
push 4
push 0
push str.StateAvailable
push dword [ebp + 8]
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
cmp dword [ebp - 8], 0
je 0x409c11
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x40c610
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x116c
call fcn.004117bf
mov eax, dword [0x42e068]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1164], eax
mov eax, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x116c], eax
xor edi, edi
mov eax, dword [ebp + 0x14]
push 0x1154
mov dword [ebp - 0x1168], eax
lea eax, [ebp - 0x1158]
push edi
push eax
mov dword [ebp - 0x115c], edi
mov dword [ebx], edi
call fcn.00412207
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x1150]
mov dword [ebp - 0x1158], 0x1154
push 0x80
push eax
mov dword [ebp - 0x1154], 7
call fcn.004164ec
add esp, 0x1c
mov dword [ebp - 0x1160], 0x1048
lea eax, [ebp - 0x1160]
push eax
lea eax, [ebp - 0x1050]
push eax
push edi
push edi
push str.Path
push dword [ebp - 0x1164]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40c740
lea eax, [ebp - 0x1160]
mov dword [ebp - 0x1160], 4
push eax
lea eax, [ebp - 8]
push eax
push edi
push edi
push str.Priority
push dword [ebp - 0x1164]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40c740
lea eax, [ebp - 0x115c]
push eax
push dword [ebp - 0x1168]
lea eax, [ebp - 0x1158]
push eax
push dword [ebp - 0x116c]
call fcn.0040c599
mov esi, eax
test esi, esi
js 0x40c740
mov eax, dword [ebp - 0x115c]
mov esi, edi
mov dword [ebx], eax
mov dword [ebp - 0x115c], edi
jmp 0x40c746
mov edi, dword [ebp - 0x115c]
test edi, edi
je 0x40c75b
mov eax, dword [edi + 4]
mov eax, dword [eax + 4]
add eax, 4
add eax, edi
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004116b9
mov esp, ebp
pop ebp
ret 0x14
Function at 0x40cacd
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
push esi
xor esi, esi
push edi
mov eax, dword [ebx + 0x250]
mov edi, esi
cmp eax, 0xffffffff
jne 0x40caea
inc edi
jmp 0x40cbb5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx + 0x250], 0xffffffff
cmp dword [ebp + 8], esi
je 0x40cbb5
cmp dword [ebx + 0x14], esi
jne 0x40cbb5
push esi
push esi
push 3
push esi
push esi
push 0xc0000000
lea eax, [ebx + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x250], eax
cmp eax, 0xffffffff
jne 0x40cb44
call esi
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x40cbb5
push 0
push 0
push dword [ebx + 0x244]
push dword [ebx + 0x240]
push dword [ebx + 0x250]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40cb78
call esi
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x40cbb5
push dword [ebx + 0x250]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x40cb9c
call esi
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x40cbb5
mov eax, dword [ebx + 0x244]
mov esi, dword [ebx + 0x20]
mov edx, dword [ebx + 0x240]
push eax
push edx
mov ecx, dword [esi]
push eax
push edx
push esi
call dword [ecx + 0x50]
mov eax, dword [ebx + 0x250]
cmp eax, 0xffffffff
je 0x40cbce
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx + 0x250], 0xffffffff
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x40dd6b
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov ecx, dword [ebp + 0xc]
xor edx, edx
push ebx
push edi
mov dword [ebp - 4], edx
mov edi, 0x80070000
mov eax, dword [ecx + 8]
mov dword [ebp - 8], edx
test eax, eax
je 0x40dd98
lea ecx, [ebp - 4]
push ecx
push eax
push edx
call fcn.0040df55
mov ebx, eax
jmp 0x40ddd7
lea eax, [ebp - 4]
push eax
push dword [ecx + 0x30]
movzx eax, byte [ecx + 0x12]
push dword [ecx + 0x2c]
push dword [ecx + 0x28]
push dword [ecx + 0x24]
push dword [ecx + 0x20]
push dword [ecx + 0x1c]
push dword [ecx + 0x18]
push dword [ecx + 0x14]
push eax
lea eax, [ecx + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x40dddb
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, edi
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x40de0b
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x40de03
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, edi
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x40de0b
xor ebx, ebx
cmp dword [ebp - 8], ebx
sete bl
cmp dword [ebp - 4], 0
je 0x40de1a
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
pop edi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x40df55
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
and dword [ebp - 4], 0
push ebx
push esi
push edi
push 0x44
pop ebx
push 1
push ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], 0xff
call fcn.004113fd
mov edi, eax
test edi, edi
jne 0x40df87
mov esi, 0x8007000e
jmp 0x40e058
push dword [ebp - 8]
lea eax, [ebp - 4]
push eax
call fcn.0040e260
mov esi, eax
test esi, esi
js 0x40e058
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x40e04f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40e03d
cmp dword [ebp - 0xc], ebx
jbe 0x40dffc
push 1
push dword [ebp - 0xc]
push edi
call fcn.00411446
mov ebx, eax
test ebx, ebx
jne 0x40dffa
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40e058
mov edi, ebx
cmp dword [ebp - 8], 0xff
jbe 0x40e017
push dword [ebp - 8]
lea eax, [ebp - 4]
push eax
call fcn.0040e260
mov esi, eax
test esi, esi
js 0x40e058
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x40e04f
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40e058
mov eax, dword [ebp + 0x10]
mov dword [eax], edi
xor edi, edi
xor esi, esi
cmp dword [ebp - 4], 0
je 0x40e066
push dword [ebp - 4]
call fcn.0040e61e
test edi, edi
je 0x40e070
push edi
call fcn.0041141f
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x40e07b
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push dword [ebp + 0xc]
mov edi, dword [ebp + 8]
xor esi, esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40e11d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40e11d
movzx eax, word [edi]
mov ecx, edi
push ebx
xor ebx, ebx
test ax, ax
je 0x40e117
push 0x5c
pop edx
cmp ax, dx
cmove ebx, ecx
add ecx, 2
movzx eax, word [ecx]
test ax, ax
jne 0x40e0b4
test ebx, ebx
je 0x40e117
push dword [ebp + 0xc]
xor eax, eax
push edi
mov word [ebx], ax
call fcn.0040e07b
mov esi, eax
push 0x5c
pop eax
mov word [ebx], ax
test esi, esi
js 0x40e11c
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40e113
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40e103
xor esi, esi
inc esi
jmp 0x40e11c
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x40e11c
xor esi, esi
jmp 0x40e11c
mov esi, 0x80070003
pop ebx
pop edi
mov eax, esi
pop esi
pop ebp
ret 8
Function at 0x40e7d2
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10014
call fcn.004117bf
mov eax, dword [0x42e068]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov dword [ebp - 0x10010], eax
xor edi, edi
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x10014], eax
mov dword [ebp - 0x10008], edi
mov dword [ebp - 0x1000c], edi
call fcn.0040e732
mov esi, eax
test esi, esi
js 0x40e8e0
lea eax, [ebp - 0x10008]
push eax
push edi
push edi
push dword [ebp + 0xc]
push dword [0x42e8f8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40e89b
push 0
lea eax, [ebp - 0x1000c]
push eax
push 0x10000
lea eax, [ebp - 0x10004]
push eax
push dword [ebp - 0x10010]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40e877
call edi
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40e8e0
cmp dword [ebp - 0x1000c], 0
push 0
jbe 0x40e8b5
push dword [ebp - 0x1000c]
lea eax, [ebp - 0x10004]
push eax
push dword [ebp - 0x10008]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x40e83e
call edi
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x40e83e
jmp 0x40e8e0
push dword [ebp - 0x10014]
xor esi, esi
push ebx
push 2
push dword [ebp - 0x10008]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
jne 0x40e8e0
call edi
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
cmp dword [ebp - 0x10008], 0
je 0x40e8f5
push dword [ebp - 0x10008]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004116b9
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40ed46
Capabilities:
Create directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
xor eax, eax
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
test edi, edi
je 0x40ed9b
cmp word [edi], ax
je 0x40ed9b
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [ebp + 0xc]
mov esi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add esi, 3
add eax, esi
push eax
push edi
lea eax, [ebp - 4]
push eax
call fcn.0040e340
mov esi, eax
test esi, esi
js 0x40ef3c
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 8], ebx
jmp 0x40edd4
mov ebx, dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
call edi
add eax, 3
push eax
lea eax, [ebp - 4]
push eax
call fcn.0040e260
mov esi, eax
test esi, esi
js 0x40ef3c
push 0xffffffffffffffff
push ebx
push 4
push dword [ebp - 4]
call fcn.004164ec
lea eax, [ebx + 6]
add esp, 0x10
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
push 0x5c
pop edx
mov dword [ebp - 0x10], edx
movzx eax, word [ecx]
cmp dx, ax
jne 0x40edeb
cmp dx, word [ecx + 2]
je 0x40ee2d
push 0x61
pop edx
cmp dx, ax
ja 0x40edfb
push 0x7a
pop edx
cmp dx, ax
jae 0x40ee13
push 0x41
pop edx
cmp dx, ax
ja 0x40ef35
push 0x5a
pop edx
cmp dx, ax
jb 0x40ef35
push 0x3a
pop eax
cmp ax, word [ecx + 2]
jne 0x40ef35
push 0x5c
pop eax
cmp ax, word [ecx + 4]
jne 0x40ef35
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40ee48
and dword [ebp - 0x14], 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0xc
mov dword [ebp - 0xc], eax
push ecx
call edi
mov ecx, dword [ebp - 4]
mov edi, dword [ebp - 8]
lea edx, [ecx + eax*2]
movzx eax, word [edi]
mov dword [ebp + 8], edx
test ax, ax
je 0x40ef3f
mov ebx, dword [ebp + 0xc]
cmp word [ebp - 0x10], ax
jne 0x40ee74
cmp edi, ebx
je 0x40ef24
push 0x5c
pop ecx
mov word [edx], ax
cmp cx, ax
jne 0x40ef1b
push dword [ebp - 0xc]
xor eax, eax
mov word [edx + 2], ax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40eeea
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
jne 0x40eed8
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40eed4
push eax
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x40eed4
call esi
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40ef3c
xor esi, esi
jmp 0x40eeea
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40ef3c
cmp dword [ebp + 0x18], 0
je 0x40ef18
push dword [ebp + 0x18]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x40ef18
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40ef3c
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 4]
add edx, 2
mov dword [ebp + 8], edx
add edi, 2
movzx eax, word [edi]
test ax, ax
jne 0x40ee66
jmp 0x40ef3f
mov esi, 0x80070057
jmp 0x40ef3f
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x40ef49
push ecx
call fcn.0040e61e
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
Function at 0x40f020
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 8], 0
lea eax, [ebp - 8]
and dword [ebp - 4], 0
push ebx
push esi
push edi
mov ebx, 0x104
or edi, 0xffffffff
push ebx
push eax
call fcn.0040e498
mov esi, eax
test esi, esi
js 0x40f108
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
xor ebx, ebx
cmp edi, 0xffffffff
jne 0x40f0d1
push dword [ebp + 0xc]
lea eax, [ebp - 4]
push ebx
push dword [ebp + 8]
push dword [ebp - 8]
push str._s_S_05d._S
push eax
call fcn.0040e4e2
mov esi, eax
add esp, 0x18
test esi, esi
js 0x40f108
push 0
push 0x80
push 1
push 0
push 1
push 0x40000000
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40f0c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
cmp esi, 0x80070050
jne 0x40f0c4
xor esi, esi
jmp 0x40f0c8
test esi, esi
js 0x40f108
inc ebx
cmp ebx, 0x3e8
jl 0x40f058
cmp dword [ebp + 0x10], 0
je 0x40f0eb
push 0xfde9
push 0
push dword [ebp - 4]
push dword [ebp + 0x10]
call fcn.0040e3b4
mov esi, eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40f0f4
mov dword [eax], edi
test esi, esi
js 0x40f0fc
test eax, eax
jne 0x40f108
cmp edi, 0xffffffff
je 0x40f108
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0
je 0x40f116
push dword [ebp - 4]
call fcn.0040e61e
cmp dword [ebp - 8], 0
je 0x40f124
push dword [ebp - 8]
call fcn.0040e61e
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40f12f
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x42e068]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x218], eax
xor esi, esi
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x210], esi
push edi
mov dword [ebp - 0x220], eax
or edi, 0xffffffff
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x40f1a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f277
xor eax, eax
mov dword [ebp - 0x214], eax
cmp edi, 0xffffffff
jne 0x40f244
push dword [ebp - 0x218]
push eax
push dword [ebp - 0x21c]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x210]
push str._s_s_05d._s
push eax
call fcn.0040e2a9
mov esi, eax
add esp, 0x18
test esi, esi
js 0x40f277
push 0
push 0x80
push 1
push 0
push 1
push 0x40000000
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40f22c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
cmp esi, 0x80070050
jne 0x40f228
xor esi, esi
jmp 0x40f22c
test esi, esi
js 0x40f277
mov eax, dword [ebp - 0x214]
inc eax
mov dword [ebp - 0x214], eax
cmp eax, 0x3e8
jl 0x40f1a8
test ebx, ebx
je 0x40f24a
mov dword [ebx], edi
mov ecx, dword [ebp - 0x220]
test ecx, ecx
je 0x40f263
mov eax, dword [ebp - 0x210]
and dword [ebp - 0x210], 0
mov dword [ecx], eax
test esi, esi
js 0x40f26b
test ebx, ebx
jne 0x40f277
cmp edi, 0xffffffff
je 0x40f277
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x210], 0
je 0x40f28b
push dword [ebp - 0x210]
call fcn.0040e61e
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004116b9
mov esp, ebp
pop ebp
ret 0x10

Function at 0x40f2a0
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40f32d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x40f31f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40f2d3
mov esi, 0x80070005
jmp 0x40f32d
test al, 0x10
je 0x40f2de
mov esi, 0x8000ffff
jmp 0x40f32d
test al, 7
je 0x40f32d
push 0x80
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x40f30c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f32d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40f32d
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov eax, esi
pop esi
pop ebp
ret 4
Function at 0x40f446
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
lea eax, [ebp - 4]
xor edi, edi
push eax
push dword [ebp + 8]
mov esi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov ebx, eax
test ebx, ebx
jne 0x40f48a
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f511
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
jne 0x40f49f
mov esi, 0x8007000e
jmp 0x40f511
push edi
push ebx
push dword [ebp - 4]
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
jne 0x40f4c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f50a
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0x4257d4
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
jne 0x40f4f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x40f50a
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [edx + 8]
mov dword [eax], ecx
mov ecx, dword [ebp + 0x10]
mov edx, dword [edx + 0xc]
mov dword [ecx], edx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc