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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x20]
mov ecx, eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x34]
imul ecx, ebx
imul eax, edi
add ecx, eax
mov eax, edi
mul ebx
mov dword [ebp - 0x2c], edx
add dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], eax
jbe 0x47d39f
mov dword [esp], str.read_sectors:_nSectors_x_SectorSize_is_too_big_n
call fcn.0043efa9
jmp 0x47d400
mov eax, edi
mov ecx, dword [ebp - 0x34]
imul eax, ebx
imul ecx, esi
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x38]
imul eax, ebx
add ecx, eax
mov eax, ebx
mul esi
add edx, ecx
xor ecx, ecx
mov dword [esp + 4], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
sub esp, 0x14
test eax, eax
jne 0x47d40a
call fcn.0043f53d
mov dword [esp + 4], esi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], str.read_sectors:_Could_not_access_sector_0x_08I64x____s_n
mov dword [esp + 8], eax
call fcn.0043efa9
or eax, 0xffffffff
mov edx, eax
jmp 0x47d4bf
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
sub esp, 0x14
test eax, eax
je 0x47d446
cmp dword [ebp - 0x2c], 0
jne 0x47d446
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x1c]
je 0x47d4ba
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, eax
mov eax, 0x4bfc62
test edx, edx
je 0x47d45c
call fcn.0043f53d
mov dword [esp + 4], eax
mov dword [esp], str.read_sectors:_Read_error__s_n
call fcn.0043efa9
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x1c]
mov dword [esp], str.__Read:__d__Expected:__I64u_n
mov dword [esp + 4], eax
call fcn.0043efa9
mov dword [esp + 0x14], ebx
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], edi
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], esi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], str.__StartSector:_0x_08I64x__nSectors:_0x_I64x__SectorSize:_0x_I64x_n
mov dword [esp + 8], eax
call fcn.0043efa9
mov eax, dword [ebp - 0x1c]
xor edx, edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x47f082
Capabilities:
Query environment variable

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
test edx, edx
je 0x47f175
cmp byte [edx], 0
jne 0x47f0d5
cmp byte [edx + 1], 0
jne 0x47f0d5
cmp byte [edx + 2], 0
jne 0x47f0d5
cmp byte [edx + 3], 0
jne 0x47f0d5
cmp byte [edx + 4], 0
jne 0x47f0d5
cmp byte [edx + 5], 0
jne 0x47f0d5
xor edx, edx
lea eax, [ebp - 0x40]
lea esi, [ebp - 0x3c]
mov dword [ebp - 0x40], edx
mov dword [esp + 4], eax
jmp 0x47f155
xor eax, eax
mov ecx, 9
mov edi, ebx
rep stosd dword es:[edi], eax
movzx eax, byte [edx]
mov dword [ebx + 0x14], eax
movzx eax, byte [edx + 1]
dec eax
mov dword [ebx + 0x10], eax
movzx eax, byte [edx + 2]
mov dword [ebx + 0xc], eax
movzx eax, byte [edx + 3]
mov dword [ebx + 8], eax
movzx eax, byte [edx + 4]
mov dword [ebx + 4], eax
movsx eax, byte [edx + 6]
movzx edx, byte [edx + 5]
mov dword [ebx + 0x20], 0xffffffff
imul eax, eax, 0xfffffc7c
add eax, edx
mov dword [ebx], eax
xor eax, eax
mov dword [esp], 0x4c0208
mov dword [ebp - 0x40], eax
call sub.msvcrt.dll_getenv
call sub.msvcrt.dll__tzset
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_mktime]
mov edi, eax
call sub.msvcrt.dll__tzset
mov eax, esi
mov dword [ebp - 0x40], edi
lea esi, [ebp - 0x3c]
test al, al
je 0x47f160
lea eax, [ebp - 0x40]
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [0x494094]
jmp 0x47f16a
mov edx, esi
lea eax, [ebp - 0x40]
call fcn.0047f06d
mov ecx, 9
mov edi, ebx
mov al, 1
rep movsd dword es:[edi], dword [esi]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x486de0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.00489b20
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.00489b20
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x486e40
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x52c430]
test esi, esi
jle 0x486f60
mov eax, dword [0x52c434]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x486e74
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x486ef7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x486e60
mov dword [esp], ebx
call fcn.00487830
mov edi, eax
test eax, eax
je 0x486f87
mov eax, dword [0x52c434]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.00487970
mov edx, dword [0x52c434]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x486f67
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x486ef0
lea edx, [eax - 0x40]
and edx, 0xffffffbf
jne 0x486f00
add dword [0x52c430], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x52c434]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x486ef0
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00486de0
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x486e7e
mov eax, dword [0x52c434]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00486de0
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00486de0
lea esi, [esi]
nop
Function at 0x4874a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x52c44c
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov ebx, dword [0x52c444]
sub esp, 4
test ebx, ebx
je 0x4874f5
mov ebp, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.DLL_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
mov esi, eax
sub esp, 4
call edi
test esi, esi
je 0x4874ee
test eax, eax
jne 0x4874ee
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4874d0
mov dword [esp], 0x52c44c
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x487830
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x487855
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x487860
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x487855
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x4878a8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x48789e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x4878aa
add ecx, 1
add eax, 0x28
cmp esi, ecx
jne 0x487890
xor eax, eax
pop ebx
pop esi
ret
Function at 0x40eb93
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41b440]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.00409b6f
mov dword [ebp - 0x14], eax
cmp dword [0x4af6e0], esi
jne 0x40ec86
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40ec13
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40ed66
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40ed66
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40ed66
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x4af6e0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x4af6e4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x4af6e8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4af6f0], eax
test eax, eax
je 0x40ec83
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4af6ec], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40ecab
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40ec9e
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40ecc0
push 4
pop eax
jmp 0x40ed68
cmp dword [ebp - 0x14], esi
je 0x40ecc0
push dword [0x4af6e0]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40eca5
mov eax, dword [0x4af6ec]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40ed1e
cmp dword [0x4af6f0], edi
je 0x40ed1e
push eax
call ebx
push dword [0x4af6f0]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40ed1e
test eax, eax
je 0x40ed1e
call ecx
test eax, eax
je 0x40ed13
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40ed13
test byte [ebp - 8], 1
jne 0x40ed1e
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40ed4e
mov eax, dword [0x4af6e4]
cmp eax, edi
je 0x40ed4b
push eax
call ebx
test eax, eax
je 0x40ed4b
call eax
mov esi, eax
test esi, esi
je 0x40ed4b
mov eax, dword [0x4af6e8]
cmp eax, edi
je 0x40ed4b
push eax
call ebx
test eax, eax
je 0x40ed4b
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x4af6e0]
call ebx
test eax, eax
je 0x40ed66
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40ed68
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404326
mov esp, ebp
pop ebp
ret
Function at 0x401000
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x5c3678]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x5c4e70]
test eax, eax
jl 0x401033
xor ecx, ecx
test eax, eax
setne cl
mov al, cl
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053c15d
mov esp, ebp
pop ebp
ret
xor eax, eax
push esi
push 0x11c
push eax
lea edx, [ebp - 0x120]
push edx
mov dword [0x5c4e70], 0
mov dword [ebp - 0x144], eax
mov dword [ebp - 0x140], eax
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x12c], eax
mov dword [ebp - 0x128], eax
mov dword [ebp - 0x124], eax
call fcn.00544310
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
add esp, 0xc
lea eax, [ebp - 0x120]
push eax
mov dword [ebp - 0x120], 0x11c
call esi
test eax, eax
jne 0x4010bf
lea ecx, [ebp - 0x120]
push ecx
mov dword [ebp - 0x120], 0x114
call esi
test eax, eax
je 0x40110e
push str.GetNativeSystemInfo
push 0x58022c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40110e
lea edx, [ebp - 0x144]
push edx
call eax
mov eax, dword [ebp - 0x144]
cmp ax, 9
je 0x4010f5
cmp ax, 6
jne 0x40110e
mov eax, 1
mov dword [0x5c4e70], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053c15d
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor al, al
pop esi
call fcn.0053c15d
mov esp, ebp
pop ebp
ret
Function at 0x4015d0
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x5c3678]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
push ebx
mov dword [ebp - 0x408], 0x1388
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntryW]
push 0
push 0
push 0
push 0
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1__SV1_
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
test edi, edi
jne 0x401625
lea eax, [edi + 1]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053c15d
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea eax, [ebp - 0x408]
push eax
push 2
push 0
call esi
push 4
lea ecx, [ebp - 0x408]
push ecx
push 5
push 0
call esi
push 4
lea edx, [ebp - 0x408]
push edx
push 6
push 0
call esi
push 4
lea eax, [ebp - 0x408]
push eax
push 8
push 0
call esi
push 0
push 0x80080000
push 0
push 0
push ebx
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
jne 0x40169e
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop esi
pop edi
lea eax, [ebx + 1]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053c15d
mov esp, ebp
pop ebp
ret
push ebx
lea ecx, [ebp - 0x410]
push ecx
lea edx, [ebp - 0x40c]
push edx
push 0x20000013
push esi
mov dword [ebp - 0x40c], ebx
mov dword [ebp - 0x410], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov eax, dword [ebp - 0x40c]
add eax, 0xffffff38
cmp eax, 0x63
ja 0x401711
push 0x400
lea ecx, [ebp - 0x404]
push 0
push ecx
mov dword [ebp - 0x414], ebx
call fcn.00544310
add esp, 0xc
lea edx, [ebp - 0x414]
push edx
push 0x400
lea eax, [ebp - 0x404]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ebx, eax
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
mov ecx, dword [ebp - 4]
xor eax, eax
test ebx, ebx
pop esi
sete al
pop edi
xor ecx, ebp
pop ebx
call fcn.0053c15d
mov esp, ebp
pop ebp
ret
Function at 0x401790
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x5cf250], 0
push esi
mov esi, eax
jne 0x401938
push 0x5cf254
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [0x5cf250], 0
je 0x4017ca
push 0x5cf254
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
mov esp, ebp
pop ebp
ret
push edi
xor ecx, ecx
push ecx
push 0x28
push 0x5cee38
xor eax, eax
push ecx
mov dword [0x5cf040], 0
mov dword [0x5cf24c], 0
mov word [0x5cee38], ax
mov word [0x5cf044], cx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40181b
push str.:windows_
push 0x5cee38
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x40189d
xor edi, edi
call fcn.004d32b0
test al, al
jne 0x40192c
test esi, esi
je 0x40192c
push esi
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x40188d
test eax, eax
je 0x40188d
lea edx, [ebp - 4]
push edx
push 8
push eax
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40188d
mov ecx, dword [ebp - 4]
lea eax, [ebp - 8]
push eax
push 0x5cee38
push ecx
mov dword [ebp - 8], 0x104
call dword [sym.imp.USERENV.dll_GetUserProfileDirectoryW]
test eax, eax
je 0x401883
mov edi, 1
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [ebp - 0xc]
call fcn.0052ce80
test edi, edi
je 0x40192c
push 0x5cee38
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov eax, 0x5cee38
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4018b0
push 0x104
sub eax, edx
push 0x5cf044
sar eax, 1
push 0x5cee38
mov dword [0x5cf040], eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x4018e4
cmp eax, 0x104
jb 0x4018ec
xor eax, eax
mov word [0x5cf044], ax
push 0x5cf044
push 0x5cee38
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
jne 0x401909
xor ecx, ecx
mov word [0x5cf044], cx
mov eax, 0x5cf044
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401911
sub eax, edx
sar eax, 1
mov dword [0x5cf24c], eax
mov byte [0x5cf250], 1
push 0x5cf254
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4019b0
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, eax
lea eax, [ebp - 8]
push eax
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
je 0x401a5b
mov eax, dword [edi + 0x20c]
test eax, eax
je 0x4019e5
push eax
call fcn.0053ccef
add esp, 4
push esi
call fcn.0053cb34
add esp, 4
mov dword [edi + 0x20c], eax
test eax, eax
je 0x401a5b
push eax
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x401a5b
mov eax, dword [edi + 0x20c]
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 4]
push edx
push str.VarFileInfoTranslation
push eax
mov dword [ebp + 8], 0
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x401a5b
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 2]
movzx edx, word [eax]
push ecx
push edx
push str.StringFileInfo_04x_04x
push 0x208
add edi, 4
push edi
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x14
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x401c90
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x5c3678]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
mov dword [ebp - 0x210], 0
call fcn.00544310
add esp, 0xc
lea ecx, [ebp - 0x214]
push ecx
lea edx, [ebp - 0x20c]
push edx
lea eax, [ebp - 0x210]
push eax
push 0x58a648
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_PathsQHSafeMain.exe
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x214], 0x208
mov dword [ebp - 0x210], 1
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x401d46
mov eax, dword [ebp - 0x214]
shr eax, 1
dec eax
cmp eax, 0x104
jae 0x401d46
cmp word [ebp + eax*2 - 0x20c], 0x5c
je 0x401d3e
cmp eax, 0x103
jae 0x401d46
mov ecx, 0x5c
xor edx, edx
mov word [ebp + eax*2 - 0x20c], cx
mov word [ebp + eax*2 - 0x20a], dx
lea ecx, [ebp - 0x20c]
jmp 0x401d4b
mov ecx, 0x57fde0
push esi
call fcn.00423950
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, esi
call fcn.0053c15d
mov esp, ebp
pop ebp
ret
Function at 0x402070
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
xor eax, eax
movzx esi, ax
push edi
add edx, 4
mov eax, esi
shl esi, 0x10
or eax, esi
mov edi, edx
mov ecx, 0x82
rep stosd dword es:[edi], eax
lea eax, [ebp - 4]
push eax
push edx
lea ecx, [ebp - 8]
push ecx
push 0x58a648
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_PathsQHSafeMain.exe
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 4], 0x208
mov dword [ebp - 8], 1
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x402fd0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565408
mov eax, dword fs:[0]
push eax
push esi
mov eax, dword [0x5c3678]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp + 8], 0
mov ecx, dword [eax]
cmp dword [ecx - 0xc], 0
jne 0x403022
push edi
mov ecx, 0x57fde0
call fcn.00423950
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
push eax
lea edx, [ebp + 8]
push edx
mov esi, 0x58096c
call fcn.00421fe0
add esp, 8
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x403056
push edi
mov ecx, 0x57fde0
call fcn.00423950
jmp 0x403066
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
call fcn.00423cf0
add eax, 0x10
mov dword [edi], eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40308c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x403c00
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x5c3678]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x20a]
push ecx
mov word [ebp - 0x20c], ax
call fcn.00544310
add esp, 0xc
push 0x104
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x403c57
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053c15d
mov esp, ebp
pop ebp
ret
push str.ntdll.dll
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x403c47
push str.RtlGetVersion
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053c15d
mov esp, ebp
pop ebp
ret

Function at 0x403ca0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x5c3678]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x110
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.00544310
add esp, 0xc
lea ecx, [ebp - 0x118]
push ecx
mov dword [ebp - 0x118], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x114], 5
jne 0x403cf6
mov eax, 1
cmp dword [ebp - 0x110], eax
je 0x403cf8
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053c15d
mov esp, ebp
pop ebp
ret
Function at 0x405250
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
mov edi, eax
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 4]
push 0
push eax
push ecx
push 2
push 0
push edi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 8], eax
test eax, eax
jne 0x40528a
call fcn.004207a0
pop edi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
push 0
push ecx
mov dword [esi + 0x10], 0
mov edx, dword [esi + 0x10]
push edx
mov dword [esi + 4], ecx
mov dword [esi + 0x14], 0
mov ecx, dword [esi + 0x14]
push ecx
push 4
push eax
mov dword [esi + 0x18], 4
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov dword [esi], eax
test eax, eax
jne 0x4052de
call fcn.004207a0
mov edx, dword [esi + 8]
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret