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

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
push edi
test ebx, ebx
jne 0x4ca56a
cmp byte [esi + 0x2c], bl
jne 0x4ca561
mov edx, dword [str.Failed_to_open_file]
mov ecx, edx
mov byte [esi + 0x2c], 1
mov dword [esi + 0x30], 2
lea edi, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4ca540
sub ecx, edi
push ecx
push edx
lea ecx, [esi + 0x34]
call fcn.004cc590
mov dword [esi + 0x40], 0xffffffff
mov dword [esi + 0x3c], 0xffffffff
pop edi
pop esi
xor al, al
pop ebx
pop ebp
ret 8
mov edi, dword [esi + 0x18]
test edi, edi
je 0x4ca580
mov ecx, edi
mov edi, dword [edi + 0x28]
push 1
mov eax, dword [ecx]
call dword [eax]
test edi, edi
jne 0x4ca571
push 2
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
push 0
push ebx
mov dword [esi + 8], 0xffffffff
mov dword [esi + 4], 0xffffffff
call fcn.0053eb0c
push ebx
call fcn.0053f142
push 0
mov edi, eax
push 0
push ebx
mov dword [ebp + 8], edi
call fcn.0053eb0c
add esp, 0x1c
test edi, edi
jg 0x4ca5ec
cmp byte [esi + 0x2c], 0
jne 0x4ca561
mov edx, dword [str.Error_document_empty.]
mov ecx, edx
mov byte [esi + 0x2c], 1
mov dword [esi + 0x30], 0xc
lea edi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4ca5e0
jmp 0x4ca547
lea eax, [edi + 1]
push eax
call fcn.0050fb2b
push ebx
mov ebx, dword [ebp + 8]
mov edi, eax
push 1
push ebx
push edi
mov byte [edi], 0
call fcn.0053f35d
add esp, 0x14
cmp eax, 1
je 0x4ca644
push edi
call fcn.0050f075
add esp, 4
cmp byte [esi + 0x2c], 0
jne 0x4ca561
mov edx, dword [str.Failed_to_open_file]
mov ecx, edx
mov byte [esi + 0x2c], 1
mov dword [esi + 0x30], 2
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4ca638
jmp 0x4ca547
mov byte [edi + ebx], 0
mov eax, edi
cmp byte [edi], 0
mov ecx, edi
je 0x4ca66f
mov dl, byte [eax]
mov ebx, eax
cmp dl, 0xd
jne 0x4ca666
inc eax
mov byte [ecx], 0xa
cmp byte [eax], 0xa
cmovne eax, ebx
jmp 0x4ca668
mov byte [ecx], dl
inc eax
inc ecx
cmp byte [eax], 0
jne 0x4ca651
push dword [ebp + 0xc]
mov byte [ecx], 0
mov ecx, esi
mov eax, dword [esi]
push 0
push edi
call dword [eax + 8]
push edi
call fcn.0050f075
add esp, 4
cmp byte [esi + 0x2c], 0
sete al
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x4da150
Capabilities:
Create directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x573a10
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5b1074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x18], edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x1c], 0
call fcn.004d7a10
mov dword [ebp - 4], 0
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4da1b6
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push dword [ebp - 0x10]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
call fcn.00409c54
mov ecx, eax
test ecx, ecx
jne 0x4da1cb
push 0x80004005
call fcn.0040b4a2
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4da1e0
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4da1e2
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp - 0x10]
mov ecx, edi
call fcn.004e9520
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov ecx, dword [ebp - 0x14]
add esp, 4
add ecx, 0xfffffff0
mov eax, esi
lock xadd dword [ecx + 0xc], eax
dec eax
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jg 0x4da245
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x14], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4da240
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x4da245
mov ecx, edx
call dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], esi
dec esi
test esi, esi
jg 0x4da28d
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4da289
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edx
call esi
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4db1d0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
mov eax, edx
push 3
push SysReAllocString
push ecx
mov dword [eax], 0
mov dword [ebp - 4], eax
mov dword [edi], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4db243
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi], eax
test eax, eax
je 0x4db27f
cmp eax, 0xffffffff
je 0x4db27f
add eax, 8
push 0x5c84a0
push eax
call fcn.0050f6fa
mov ebx, dword [ebp - 4]
mov ecx, eax
add esp, 8
mov dword [ebx], ecx
test ecx, ecx
jne 0x4db24c
push esi
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
add eax, 8
push eax
push 0
push ecx
call fcn.00516180
add esp, 0xc
mov dword [ebp + 8], 0
lea eax, [ebp + 8]
push 0
push eax
push dword [edi]
push dword [ebx]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp + 8]
xor ebx, ebx
cmp ecx, dword [edi]
sete bl
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4db290
Capabilities:
Delete file
Move file
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x573b38
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x5b1074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x14], esi
mov ebx, ecx
test ebx, ebx
je 0x4db3fb
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x4db3fb
test esi, esi
je 0x4db3fb
call fcn.00409c54
mov ecx, eax
test ecx, ecx
jne 0x4db2f3
push 0x80004005
call fcn.0040b4a2
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4db308
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4db30a
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
push ebx
lea eax, [ebp - 0x10]
mov dword [ebp - 4], 0
push str._s.write_cache
push eax
call fcn.00418437
mov esi, dword [ebp - 0x10]
add esp, 0xc
xor edi, edi
push edi
push 0x80
push 2
push edi
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x4db39d
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp + 8]
push ecx
push edi
push dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x18]
xor eax, eax
cmp dword [ebp - 0x10], edi
sete al
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x4db39d
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [esi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4db3e7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4db3e5
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call edx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4db410
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x573b68
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
push edi
mov eax, dword [0x5b1074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov esi, ecx
test esi, esi
je 0x4db4ba
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4db4ba
mov dword [ebp - 0x1c], vtable.CxAutoArray_unsigned_char_.0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x10]
mov dword [ebp - 4], 0
push eax
lea edx, [ebp - 0x18]
mov dword [ebp - 0x10], 0
mov ecx, esi
call fcn.004db1d0
mov esi, dword [ebp - 0x18]
add esp, 4
test eax, eax
je 0x4db498
cmp dword [ebp - 0x10], 0
je 0x4db498
mov edx, edi
mov ecx, esi
call fcn.004db800
mov edi, eax
jmp 0x4db49a
xor edi, edi
test esi, esi
je 0x4db4a7
push esi
call fcn.0050f075
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4e67d0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x574eb6
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x5b1074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 8
mov dword [edi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.0050f042
mov esi, eax
push 1
mov dword [ebp - 4], 0
call fcn.004f5893
mov dword [esi + 4], eax
lea ecx, [edi + 8]
lea eax, [edi + 4]
mov dword [edi + 0x34], esi
mov dword [edi + 0xc], eax
add esp, 8
lea eax, [edi + 0x14]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x1c], eax
lea eax, [edi + 0x18]
mov dword [edi + 0x20], eax
lea eax, [edi + 0x24]
mov dword [edi + 0x2c], eax
lea eax, [edi + 0x28]
mov dword [edi + 0x30], eax
mov dword [ecx], 0
mov eax, dword [edi + 0x20]
mov dword [eax], 0
mov eax, dword [edi + 0x30]
mov dword [eax], 0
mov eax, dword [edi + 0xc]
mov dword [eax], 0
mov eax, dword [edi + 0x1c]
mov dword [eax], 0
mov eax, dword [edi + 0x2c]
mov dword [eax], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4e8630
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push ecx
mov esi, ecx
call fcn.004e85d0
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x4e864f
mov dword [esi + 4], 0xffffffff
jmp 0x4e8680
cmp dword [esi], 0
mov edx, 0xc0000000
push 0
push 0x80
push 4
push 0
mov eax, SysReAllocString
push 3
cmovne eax, edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x4e8712
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
jne 0x4e8692
xorps xmm0, xmm0
movlpd qword [ebp - 8], xmm0
jmp 0x4e869d
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov dword [esi + 0x10], eax
or eax, ecx
mov dword [esi + 0x14], ecx
jne 0x4e86bb
cmp dword [esi], eax
je 0x4e86bb
mov dword [esi + 0x10], 1
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x10]
mov cl, 0x20
mov edx, dword [esi + 0x14]
push ebx
xor ebx, ebx
cmp dword [esi], ebx
push 0
push dword [esi + 0x10]
setne bl
lea ebx, [ebx*2 + 2]
call fcn.00564fc0
push eax
push ebx
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 8], eax
pop ebx
test eax, eax
je 0x4e8712
cmp dword [esi], 0
mov edx, 0xf001f
push 0
push 0
mov ecx, 4
push 0
cmovne ecx, edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0xc], eax
cmp dword [esi + 0xc], 0
jne 0x4e8720
push ecx
mov ecx, esi
call fcn.004e85d0
pop esi
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4e87d0
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x5a99e8
push 0x516440
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5b1074]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x34], eax
mov ebx, ecx
mov dword [ebp - 0x30], ebx
xor edi, edi
mov dword [ebp - 0x28], edi
xor esi, esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 4], esi
mov ecx, eax
call fcn.004ed380
mov dword [ebp - 0x20], esi
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov ebx, eax
test ebx, ebx
je 0x4e88a4
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
mov dword [ebp - 0x2c], esi
test esi, esi
je 0x4e88a4
push esi
push ebx
push dword [ebp - 0x20]
push dword [ebp - 0x30]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x4e88a4
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
push str.VarFileInfoTranslation
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x4e88a4
push ecx
mov eax, dword [ebp - 0x1c]
shr eax, 2
push eax
mov ecx, dword [ebp - 0x34]
call fcn.004ed320
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x34]
call fcn.004ed3b0
push eax
call fcn.00512bc0
add esp, 0xc
mov edi, 1
mov dword [ebp - 0x28], edi
mov dword [ebp - 4], 0xfffffffe
call fcn.004e88ca
mov eax, edi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4e9300
Capabilities:
Check if file exists
Delete file
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5752f8
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x5b1074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push edi
call esi
test eax, eax
je 0x4e9413
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
call ebx
test eax, eax
jne 0x4e9413
push edi
call esi
test eax, eax
je 0x4e9413
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4e9370
push edi
call ebx
test eax, eax
jne 0x4e9413
call fcn.00409c54
mov ecx, eax
test ecx, ecx
jne 0x4e9385
push 0x80004005
call fcn.0040b4a2
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4e939a
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4e939c
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push edi
lea eax, [ebp - 0x10]
push str._s._lu
push eax
call fcn.00418437
mov esi, dword [ebp - 0x10]
add esp, 0x10
push esi
call ebx
push 1
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
call edi
push 4
push 0
push esi
call edi
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4e9413
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4e9411
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4e9413
call edx
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4ebc00
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, ecx
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
jl 0x4ebc2c
push 0x591cc4
push eax
call fcn.00512113
add esp, 8
test eax, eax
je 0x4ebc2c
sub eax, dword [esi]
sar eax, 1
cmp eax, 1
je 0x4ebc5b
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
jl 0x4ebcdb
push 0x591ccc
push eax
call fcn.00512113
add esp, 8
test eax, eax
je 0x4ebcdb
sub eax, dword [esi]
sar eax, 1
cmp eax, 1
jne 0x4ebcdb
push edi
xorps xmm0, xmm0
lea eax, [ebp - 4]
push 3
push eax
mov ecx, esi
movq qword [ebp - 0xc], xmm0
movq qword [ebp - 0x14], xmm0
call fcn.00424f30
push 0
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov edx, dword [ebp - 4]
mov edi, eax
add edx, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4ebcba
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4ebce2
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
pop edi
je 0x4ebcdb
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x4ebcd1
mov eax, dword [ebp - 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
mov dword [ecx + 4], eax
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
call esi
jmp 0x4ebcba
Function at 0x4ee060
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57583b
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x5b1074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x21c], esi
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 0x220], esi
push 0
push eax
mov dword [ebp - 0x224], 0
call fcn.00516180
add esp, 0xc
lea eax, [ebp - 0x218]
push 1
push 0x26
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
call fcn.00409c54
mov ecx, eax
test ecx, ecx
jne 0x4ee0e4
push 0x80004005
call fcn.0040b4a2
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4ee0f9
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4ee0fb
call edx
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
test eax, 0xffff0000
jne 0x4ee1ce
movzx edi, ax
mov ecx, edi
call fcn.00408f5a
mov ebx, eax
test ebx, ebx
je 0x4ee1f5
mov eax, edi
shr eax, 4
inc eax
push 6
movzx eax, ax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4ee1f5
push edi
mov edx, eax
mov ecx, ebx
call fcn.00408f9e
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4ee1f5
mov eax, dword [esi]
mov ecx, 1
movzx edi, word [ebx]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or ecx, eax
jge 0x4ee17c
push edi
mov ecx, esi
call fcn.00409225
movzx ecx, word [ebx]
lea eax, [ebx + 2]
push ecx
push eax
push edi
push dword [esi]
call fcn.0051d6f6
add esp, 0x10
cmp eax, 0x50
ja case.0x4ee19f.1
movzx eax, byte [eax + 0x4ee224]
jmp dword [eax*4 + 0x4ee214]
push 0x8007000e
call fcn.0040b4a2
push 0x80070057
call fcn.0040b4a2
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg case.0x4ee19f.20
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [esi]
mov word [eax + edi*2], cx
jmp 0x4ee1f5
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ee1d7
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00409323
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050eff9
mov esp, ebp
pop ebp
ret
Function at 0x4eec90
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5759ab
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x5b1074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x21c], esi
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 0x220], esi
push 0
push eax
mov dword [ebp - 0x224], 0
call fcn.00516180
add esp, 0xc
lea eax, [ebp - 0x218]
push 1
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.MasterPDFData
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
call fcn.00409c54
mov ecx, eax
test ecx, ecx
jne 0x4eed26
push 0x80004005
call fcn.0040b4a2
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4eed3b
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4eed3d
call edx
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
test eax, 0xffff0000
jne 0x4eee10
movzx edi, ax
mov ecx, edi
call fcn.00408f5a
mov ebx, eax
test ebx, ebx
je 0x4eee3e
mov eax, edi
shr eax, 4
inc eax
push 6
movzx eax, ax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4eee3e
push edi
mov edx, eax
mov ecx, ebx
call fcn.00408f9e
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4eee3e
mov eax, dword [esi]
mov ecx, 1
movzx edi, word [ebx]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or ecx, eax
jge 0x4eedbe
push edi
mov ecx, esi
call fcn.00409225
movzx ecx, word [ebx]
lea eax, [ebx + 2]
push ecx
push eax
push edi
push dword [esi]
call fcn.0051d6f6
add esp, 0x10
cmp eax, 0x50
ja case.0x4eede1.1
movzx eax, byte [eax + 0x4eee6c]
jmp dword [eax*4 + 0x4eee5c]
push 0x8007000e
call fcn.0040b4a2
push 0x80070057
call fcn.0040b4a2
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg case.0x4eede1.20
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [esi]
mov word [eax + edi*2], cx
jmp 0x4eee3e
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4eee20
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00409323
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050eff9
mov esp, ebp
pop ebp
ret