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

Disassembly:
sub esp, 0x90c
push ebx
push esi
mov edx, ecx
push edi
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x114]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov al, byte [edx + 0x941]
cmp al, 0x3a
je 0x405570
cmp byte [edx + 0x940], 0x5c
je 0x405570
cmp al, 0x5c
je 0x405570
mov edi, dword [esp + 0x91c]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [edx + 0x940]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push eax
push 3
mov ecx, ebx
push eax
push eax
and ecx, 3
lea eax, [esp + 0x24]
push 0x80000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4055de
lea ecx, [esp + 0x10]
push ecx
push 0x21
push 0x428420
call fcn.004097e0
add esp, 0xc
or eax, esi
pop edi
pop esi
pop ebx
add esp, 0x90c
ret 4
lea edx, [esp + 0xc]
push 0
push edx
lea eax, [esp + 0x11c]
push 0x800
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
push esi
jne 0x405627
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
push ecx
push 0x21
push 0x428420
call fcn.004097e0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x90c
ret 4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x114]
push edx
call fcn.00413b40
mov al, byte [esp + 0x118]
add esp, 4
test al, al
lea esi, [esp + 0x114]
je 0x405696
mov bl, 0x6d
cmp byte [esi], 0x69
jne 0x40566f
cmp byte [esi + 4], bl
jne 0x40566f
push 8
push 0x42225c
push esi
call fcn.00413b00
add esp, 0xc
test eax, eax
je 0x405685
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x405651
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x90c
ret 4
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x90c
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x90c
ret 4
Function at 0x405ea0
Capabilities:
Delete file
Get common file path

Disassembly:
sub esp, 0x208
lea eax, [esp]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x104]
lea edx, [esp]
push ecx
push 0
push 0x422368
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405ee0
mov eax, 1
add esp, 0x208
ret
lea eax, [esp + 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
add esp, 0x208
ret
Function at 0x4067d0
Capabilities:
Get disk information

Disassembly:
sub esp, 0x28
push ebx
push esi
mov esi, dword [esp + 0x34]
xor al, al
mov byte [esp + 8], al
mov cl, byte [esi]
test cl, cl
je 0x406802
mov bl, byte [esi + 1]
mov dl, 0x3a
cmp bl, dl
jne 0x406802
mov al, cl
mov byte [esp + 9], dl
mov byte [esp + 8], al
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
lea ecx, [esp + 0x10]
push 0x20
push ecx
lea edx, [esp + 0x14]
lea ecx, [esp + 0x3c]
push edx
neg al
push ecx
lea edx, [esp + 0x18]
sbb eax, eax
push 0
push 0
and eax, edx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x406834
pop esi
pop ebx
add esp, 0x28
ret
lea eax, [esp + 0x10]
push 0x422414
push eax
call fcn.00413600
add esp, 8
test eax, eax
jne 0x406876
mov eax, dword [esp + 0x34]
cmp eax, 0xc
jne 0x406866
push 3
push 8
push esi
call fcn.00406940
add esp, 0xc
pop esi
pop ebx
add esp, 0x28
ret
push eax
push esi
call fcn.004068f0
add esp, 8
pop esi
pop ebx
add esp, 0x28
ret
lea ecx, [esp + 0x10]
push 0x42240c
push ecx
call fcn.00413600
add esp, 8
test eax, eax
je 0x4068d7
lea edx, [esp + 0x10]
push 0x422404
push edx
call fcn.00413600
add esp, 8
test eax, eax
je 0x4068d7
lea eax, [esp + 0x10]
push 0x4223fc
push eax
call fcn.00413600
add esp, 8
test eax, eax
jne 0x4068cc
mov ecx, dword [esp + 0x34]
push ecx
push esi
call fcn.004068f0
add esp, 8
pop esi
pop ebx
add esp, 0x28
ret
mov eax, 1
pop esi
pop ebx
add esp, 0x28
ret
mov edx, dword [esp + 0x34]
push edx
push esi
call fcn.004068f0
add esp, 8
pop esi
pop ebx
add esp, 0x28
ret
Function at 0x406d60
Capabilities:
Get disk size

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push edi
xor ebx, ebx
push 1
xor ebp, ebp
mov dword [esp + 0x2c], ebx
call esi
push 0x42243c
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push 0x422428
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x406ddb
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x34]
push ecx
push edx
mov edx, dword [esp + 0x50]
lea ecx, [esp + 0x34]
push ecx
push edx
call eax
test eax, eax
je 0x406ddb
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x406dca
mov eax, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x28], eax
jmp 0x406dd6
mov ecx, dword [esp + 0x38]
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x28], ecx
mov ebx, 1
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, dword [esp + 0x14]
push edx
call esi
test ebx, ebx
je 0x406dfb
mov eax, ebp
mov edx, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push 1
call esi
mov edi, eax
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x50]
lea eax, [esp + 0x18]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
push edi
mov ebx, eax
call esi
test ebx, ebx
jne 0x406e35
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x4c]
mov eax, ebx
mov esi, dword [esp + 0x1c]
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
test ecx, ecx
je 0x406e57
imul eax, dword [esp + 0x20]
jmp 0x406e5a
imul eax, esi
mov edi, dword [esp + 0x10]
imul eax, edi
cdq
test edx, edx
jl 0x406e6f
jg 0x406ea0
cmp eax, 0x7a11f8
ja 0x406ea0
push 0
push 0x80
push edx
push eax
call fcn.004141a0
test esi, esi
je 0x406ea0
test edi, edi
je 0x406ea0
test ebx, ebx
je 0x406ea0
test edx, edx
jl 0x406ea0
jg 0x406e93
test eax, eax
jb 0x406ea0
test edx, edx
jg 0x406ea0
jl 0x406ea7
cmp eax, 0x3d08fc00
jbe 0x406ea7
mov eax, 0x3d08fc00
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret

Function at 0x406f20
Capabilities:
Get disk information

Disassembly:
sub esp, 8
push ebx
push esi
push edi
mov ecx, 0x4e
xor eax, eax
mov edi, 0x426ce8
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov byte [esp + 0xd], 0x3a
mov byte [esp + 0xe], 0x5c
mov byte [esp + 0xf], al
mov dword [esp + 0x10], eax
mov esi, 0x426cea
mov bl, byte [esp + 0x10]
lea eax, [esp + 0xc]
add bl, 0x61
push eax
mov byte [esp + 0x10], bl
call edi
cmp eax, 3
mov dword [esi + 2], eax
jne 0x406f79
lea ecx, [esi - 2]
push esi
push ecx
push ebx
call fcn.00406eb0
add esp, 0xc
mov edx, dword [esp + 0x10]
add esi, 0xc
inc edx
cmp esi, 0x426e22
mov dword [esp + 0x10], edx
jl 0x406f51
pop edi
pop esi
pop ebx
add esp, 8
ret
Function at 0x406fa0
Capabilities:
Get disk information

Disassembly:
sub esp, 0x10c
push ebx
push esi
mov esi, dword [esp + 0x118]
push edi
push esi
lea eax, [esp + 0x14]
push 0x4221dc
push eax
call fcn.00413140
mov cl, byte [esi]
mov dl, byte [esi + 1]
mov al, byte [esi + 2]
add esp, 0xc
mov byte [esp + 0xc], cl
lea ecx, [esp + 0xc]
push ecx
mov byte [esp + 0x11], dl
mov byte [esp + 0x12], al
mov byte [esp + 0x13], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
je 0x406ffd
cmp eax, 2
je 0x406ffd
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edi, dword [sym.imp.USER32.dll_CharPrevA]
not ecx
dec ecx
add ecx, esi
push ecx
push esi
call edi
mov cl, byte [eax]
mov ebx, dword [sym.imp.USER32.dll_CharNextA]
cmp cl, 0x20
jne 0x407031
push eax
push esi
call edi
cmp byte [eax], 0x20
je 0x407022
push eax
call ebx
mov byte [eax], 0
mov cl, byte [esi]
mov eax, esi
test cl, cl
je 0x407071
mov edi, dword [esp + 0xc]
cmp cl, 0x5c
jne 0x407047
cmp byte [edi], 0x20
je 0x407065
push eax
mov edi, eax
call ebx
mov cl, byte [eax]
test cl, cl
jne 0x40703d
push esi
call fcn.004067d0
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
push esi
call fcn.004067d0
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
Function at 0x408820
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x21c
lea eax, [esp + 8]
push ebx
push ebp
push esi
push edi
xor edi, edi
push eax
push 0x20019
push edi
push 0x422594
push 0x80000002
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40885a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret
lea ecx, [esp + 0x10]
lea edx, [esp + 0x1c]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
push ecx
push edx
mov edx, dword [esp + 0x20]
push 0
lea eax, [esp + 0x20]
push 0
lea ecx, [esp + 0x34]
push eax
push ecx
mov ebp, 8
push 0
push edx
mov dword [esp + 0x34], 0x208
mov dword [esp + 0x30], ebp
call ebx
cmp eax, 0x103
je 0x4088df
test eax, eax
jne 0x4088f7
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
add ecx, eax
lea edx, [esp + 0x10]
lea eax, [esp + 0x1c]
push edx
lea esi, [esi + ecx + 0x10]
push eax
mov eax, dword [esp + 0x20]
push 0
lea ecx, [esp + 0x20]
push 0
lea edx, [esp + 0x34]
inc edi
push ecx
push edx
push edi
push eax
mov dword [esp + 0x34], 0x208
mov dword [esp + 0x30], ebp
call ebx
cmp eax, 0x103
jne 0x408899
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x21c
ret

Function at 0x4099c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [0x42845c]
push ebx
push ebp
push esi
push edi
and ecx, 0xffff
push 0xc8
push ecx
push eax
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
jne 0x4099ed
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
mov ecx, dword [0x42845c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x409a06
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x409a1a
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
mov eax, dword [esi]
mov edi, dword [esp + 0x18]
push eax
mov dword [edi], eax
call fcn.00413950
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x409a38
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
push ebx
push esi
call fcn.00409870
mov eax, dword [esp + 0x28]
add esp, 8
test eax, eax
je 0x409a77
cmp word [ebx], 0x4d42
je 0x409a72
push ebx
call fcn.004138b0
mov edx, dword [esp + 0x20]
mov dword [edi], 0
add esp, 4
mov eax, dword [edx]
mov byte [eax], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
mov ebp, 0xe
mov ecx, dword [edi]
sub ecx, ebp
push ecx
call fcn.00413950
mov edx, dword [esp + 0x20]
add esp, 4
test eax, eax
mov dword [edx], eax
jne 0x409aa0
push ebx
call fcn.004138b0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
mov ecx, dword [edi]
mov edi, eax
sub ecx, ebp
lea esi, [ebp + ebx]
mov eax, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004138b0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
ret 0x10
Function at 0x40a9d0
Capabilities:
Shutdown system

Disassembly:
mov eax, dword [0x429048]
sub esp, 0x114
test eax, eax
push esi
mov esi, ecx
je 0x40aa3e
lea eax, [esp + 4]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40aa4c
lea ecx, [esp + 0xc]
push ecx
push 0x422b28
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [esp + 4]
push 0
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
push eax
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40aa4c
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x40aa85
mov edx, dword [esi + 0x3c]
lea ecx, [esp + 0x18]
push 0xff
push ecx
push 0x23
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
add esi, 0xe4
push 0x2030
lea eax, [esp + 0x1c]
push esi
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop esi
add esp, 0x114
ret
mov eax, 1
pop esi
add esp, 0x114
ret

Function at 0x40b0d0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x104
mov edx, dword [esp + 0x108]
mov eax, dword [esp + 0x114]
push ebx
push ebp
push esi
push edi
test edx, edx
mov ebx, ecx
mov dword [esp + 0x10], eax
jne 0x40b0f7
mov edx, 0x80000002
mov edi, dword [esp + 0x11c]
lea ebp, [esp + 0x14]
test edi, edi
jne 0x40b10b
mov edi, 0x428f3c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebx]
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
jne 0x40b155
push ebx
push 0x2001f
lea ecx, [esp + 0x1c]
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40b155
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret 0x18
mov eax, dword [esp + 0x128]
lea edx, [esp + 0x12c]
push edx
mov edx, dword [esp + 0x124]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [ebx]
push ecx
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
xor ecx, ecx
pop edi
test eax, eax
sete cl
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x104
ret 0x18
Function at 0x40c740
Capabilities:
Create process on windows
Delete file
Get common file path
Resume thread
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0x850
lea eax, [esp + 0x364]
push esi
push edi
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x40c92d
lea ecx, [esp + 0x60]
lea edx, [esp + 0x36c]
push ecx
push 0
push 0x422ccc
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x40c92d
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x268]
push 0
lea edx, [esp + 0x168]
push ecx
lea eax, [esp + 0x10]
push edx
lea ecx, [esp + 0x6c]
push eax
push ecx
call fcn.00414020
add esp, 0x14
lea edx, [esp + 0x268]
lea eax, [esp + 0x164]
lea ecx, [esp + 8]
push 0x422cc4
push edx
push eax
lea edx, [esp + 0x6c]
push ecx
push edx
call fcn.00414bc0
add esp, 0x14
lea eax, [esp + 0x60]
push 0
push 0x8000080
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c92d
lea ecx, [esp + 0x164]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x164]
lea eax, [esp + 0x268]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x268]
push 0x5c
push ecx
call fcn.00414b90
add esp, 8
mov byte [eax], 0
lea edx, [esp + 0x60]
lea eax, [esp + 0x164]
push edx
lea ecx, [esp + 0x168]
push eax
push ecx
lea edx, [esp + 0x47c]
push 0x422c88
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [esp + 8]
lea ecx, [esp + 0x470]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x478]
push eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x1c]
lea edx, [esp + 0x60]
rep stosd dword es:[edi], eax
mov word [esp + 0x4c], ax
lea eax, [esp + 0xc]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0x4220bc
push 0
push 0x44
push 0
push 0
push 0
push edx
push 0
mov dword [esp + 0x44], 0x44
mov dword [esp + 0x70], 1
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40c92d
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 0xfffffffffffffff1
push eax
call edi
push 0xf
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call edi
push 0x80
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov ecx, dword [esp + 0xc]
push ecx
call esi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [esp + 0x10]
push eax
call esi
pop edi
pop esi
add esp, 0x850
ret
Function at 0x40cd50
Capabilities:
Get common file path
Get file version info

Disassembly:
sub esp, 0x110
lea eax, [esp + 0xc]
push ebx
push esi
push edi
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + ecx + 0x18]
lea ecx, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x5c
je 0x40cdba
mov edi, 0x4220bc
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x42243c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
test edi, edi
jne 0x40ce0a
xor ax, ax
pop edi
pop esi
pop ebx
add esp, 0x110
ret
push edi
call fcn.00413950
mov esi, eax
add esp, 4
test esi, esi
jne 0x40ce26
xor ax, ax
pop edi
pop esi
pop ebx
add esp, 0x110
ret
push esi
push edi
lea edx, [esp + 0x20]
push 0
push edx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x40ce4e
push esi
call fcn.004138b0
add esp, 4
xor ax, ax
pop edi
pop esi
pop ebx
add esp, 0x110
ret
lea eax, [esp + 0x14]
lea ecx, [esp + 0xc]
push eax
push ecx
push 0x422cf0
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x40ce7d
push esi
call fcn.004138b0
add esp, 4
xor ax, ax
pop edi
pop esi
pop ebx
add esp, 0x110
ret
mov edx, dword [esp + 0xc]
push esi
mov di, word [edx]
call fcn.004138b0
add esp, 4
mov ax, di
pop edi
pop esi
pop ebx
add esp, 0x110
ret
Function at 0x40cea0
Capabilities:
Get file version info

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov ebp, dword [esp + 0x18]
push esi
lea ecx, [esp + 0x14]
push edi
push ecx
mov dword [ebp], 0
push ebx
mov dword [eax], 0
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov edi, eax
test edi, edi
jne 0x40ced5
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push edi
call fcn.00413950
mov esi, eax
add esp, 4
test esi, esi
jne 0x40ceea
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push esi
push edi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x40cf09
push esi
call fcn.004138b0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
lea edx, [esp + 0x10]
lea eax, [esp + 0x20]
push edx
push eax
push 0x4220bc
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x40cf33
push esi
call fcn.004138b0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x20]
push esi
mov ecx, dword [eax + 0xc]
mov dword [ebp], ecx
mov edx, dword [eax + 8]
mov eax, dword [esp + 0x20]
mov dword [eax], edx
call fcn.004138b0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x40cf60
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
xor eax, eax
push ebx
push esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
push edi
lea eax, [esp + 0x14]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + ecx + 0x14]
lea ecx, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x5c
je 0x40cfd4
mov edi, 0x4220bc
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x422d1c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0xc]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
push edx
call fcn.0040cea0
add esp, 0xc
test eax, eax
je 0x40d04c
mov eax, dword [esp + 0x10]
mov ecx, eax
shr ecx, 0x10
cmp ecx, 4
jb 0x40d04c
cmp ax, 0x47
jb 0x40d04c
mov edx, dword [esp + 0xc]
shr edx, 0x10
cmp edx, 0x9d0
jb 0x40d04c
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x10c
ret
Function at 0x40e9c0
Capabilities:
Get file version info

Disassembly:
mov eax, 0x140c
call fcn.00414df0
push esi
push edi
mov edi, dword [esp + 0x1418]
lea eax, [esp + 0x10]
push eax
push edi
mov esi, 0x1400
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
jne 0x40e9f0
pop edi
pop esi
add esp, 0x140c
ret
cmp eax, 0x1400
jae 0x40e9f9
mov esi, eax
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push esi
push edx
push edi
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x40ea17
pop edi
pop esi
add esp, 0x140c
ret
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
lea edx, [esp + 0x1c]
push 0x422cf0
push edx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x40ea3d
pop edi
pop esi
add esp, 0x140c
ret
mov eax, dword [esp + 8]
test eax, eax
jbe 0x40ea56
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x141c]
mov cx, word [eax]
mov word [edx], cx
pop edi
mov eax, 1
pop esi
add esp, 0x140c
ret