joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002880
Capabilities:
Delete service
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10023048
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x10030008]
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
test esi, esi
jne 0x100028b9
lea eax, [ecx + 0x57]
jmp 0x10002a0d
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x100028d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10002a0d
push 0xf01ff
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
je 0x100028f3
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push 0x22
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x28]
push str.SYSTEMCurrentControlSetServices_
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.10006940
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
push esi
call fcn.10006a90
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x34]
push ecx
push 0xf003f
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100029a6
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 0x2c]
push 4
push eax
push 4
push 0
push 0x100276f0
push dword [ebp - 0x34]
mov dword [ebp - 0x2c], 1
call esi
push 4
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 4
push eax
push 4
push 0
push 0x100276d8
push dword [ebp - 0x34]
call esi
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x100029b3
push edi
call esi
push ebx
call esi
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x100029f9
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100029ef
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100029ef
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002167a
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
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.10021639
mov esp, ebp
pop ebp
ret
Function at 0x10010250
Capabilities:
Extract resource via kernel32 functions
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x10030008]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ecx + 0x14], 8
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x14], eax
mov ebx, edx
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], eax
mov byte [ebp - 0xd], 1
jb 0x10010280
mov ecx, dword [ecx]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
test esi, esi
je 0x1001035a
cmp dword [edi + 0x14], 8
jb 0x10010299
mov edi, dword [edi]
mov eax, dword [ebp - 0x14]
push edi
movzx eax, ax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x1001035a
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x1001035a
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x1001035a
cmp dword [ebx + 0x14], 8
jb 0x100102df
mov ebx, dword [ebx]
push 0
push 0x80000080
push 2
push 0
push 0
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001035a
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push edi
push dword [ebp - 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x10010321
cmp edi, dword [ebp - 8]
je 0x10010325
mov byte [ebp - 0xd], 0
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
movzx ebx, byte [ebp - 0xd]
xor ecx, ecx
cmp eax, edi
push esi
cmovne ebx, ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10021639
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10021639
mov esp, ebp
pop ebp
ret
Function at 0x10010700
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100244d8
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x10030008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x23c], esi
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x240], esi
mov dword [ebp - 0x220], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov dword [ebp - 4], eax
push 0x20c
push eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x220], 1
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0x105
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
dec eax
cmp eax, 0x103
ja 0x100107ce
xor eax, eax
lea ecx, [ebp - 0x21c]
mov word [ebp - 0x12], ax
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100107b0
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.10006940
cmp dword [esi + 0x10], 0
je 0x1001095e
push 4
xor eax, eax
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0
lea ecx, [ebp - 0x238]
push str.Temp
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 7
mov word [ebp - 0x238], ax
call fcn.10006940
mov dword [ebp - 4], 1
lea eax, [ebp - 0x238]
push eax
mov edx, esi
lea ecx, [ebp - 0x258]
call fcn.100196b0
add esp, 4
mov edi, eax
mov byte [ebp - 4], 2
cmp esi, edi
je 0x1001086d
mov ecx, esi
call fcn.100068e0
movups xmm0, xmmword [edi]
xor eax, eax
movups xmmword [esi], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [esi + 0x10], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x244]
cmp edx, 8
jb 0x100108b3
mov ecx, dword [ebp - 0x258]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100108a9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100108a9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002167a
add esp, 8
xor eax, eax
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x244], 7
mov word [ebp - 0x258], ax
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x224]
cmp edx, 8
jb 0x10010915
mov ecx, dword [ebp - 0x238]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1001090b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1001090b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002167a
add esp, 8
xor eax, eax
mov dword [ebp - 0x228], 0
mov ecx, esi
mov dword [ebp - 0x224], 7
mov word [ebp - 0x238], ax
call fcn.10018660
test al, al
jne 0x1001095e
mov ecx, esi
call fcn.10018ba0
test al, al
jne 0x1001095e
cmp dword [esi + 0x14], 8
mov eax, esi
mov dword [esi + 0x10], 0
jb 0x10010959
mov eax, dword [esi]
xor ecx, ecx
mov word [eax], cx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10021639
mov esp, ebp
pop ebp
ret
Function at 0x10012570
Capabilities:
Link many functions at runtime

Disassembly:
push esi
mov esi, ecx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov eax, dword [esi + 4]
test eax, eax
jne 0x10012593
push str.Ktmw32.dll
call edi
mov dword [esi + 4], eax
test eax, eax
je 0x100126a3
cmp dword [esi + 8], 0
jne 0x100125a3
push str.Advapi32.dll
call edi
mov dword [esi + 8], eax
cmp dword [esi + 0xc], 0
jne 0x100125b3
push 0x10028ea0
call edi
mov dword [esi + 0xc], eax
cmp dword [esi + 8], 0
je 0x100126a3
cmp dword [esi + 0xc], 0
je 0x100126a3
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateTransaction
push dword [esi + 4]
call edi
mov dword [esi + 0x10], eax
test eax, eax
je 0x100126a3
push str.RollbackTransaction
push dword [esi + 4]
call edi
mov dword [esi + 0x14], eax
test eax, eax
je 0x100126a3
push str.CommitTransaction
push dword [esi + 4]
call edi
mov dword [esi + 0x18], eax
test eax, eax
je 0x100126a3
push str.RegCreateKeyTransactedW
push dword [esi + 8]
call edi
push str.RegDeleteKeyTransactedW
mov dword [esi + 0x1c], eax
push dword [esi + 8]
call edi
push str.RegOpenKeyTransactedW
mov dword [esi + 0x20], eax
push dword [esi + 8]
call edi
push str.DeleteFileTransactedW
mov dword [esi + 0x24], eax
push dword [esi + 0xc]
call edi
push str.CopyFileTransactedW
mov dword [esi + 0x28], eax
push dword [esi + 0xc]
call edi
push str.CreateDirectoryTransactedW
mov dword [esi + 0x2c], eax
push dword [esi + 0xc]
call edi
push str.MoveFileTransactedW
mov dword [esi + 0x30], eax
push dword [esi + 0xc]
call edi
push str.CreateFileTransactedW
mov dword [esi + 0x34], eax
push dword [esi + 0xc]
call edi
push str.RemoveDirectoryTransactedW
mov dword [esi + 0x38], eax
push dword [esi + 0xc]
call edi
push str.SetFileAttributesTransactedW
mov dword [esi + 0x3c], eax
push dword [esi + 0xc]
call edi
push 0
push 0
push 0
push 0
push 0
push 0
mov dword [esi + 0x40], eax
mov eax, dword [esi + 0x10]
push 0
call eax
mov dword [esi], eax
pop edi
pop esi
ret 0x10
Function at 0x10012bb0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10024818
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x10030008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi], 0
jne 0x10012ce8
push 0xc
xor eax, eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x24]
push str.wintrust.dll
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 7
mov word [ebp - 0x24], ax
call fcn.10006940
mov dword [ebp - 4], 0
lea eax, [ebp - 0x24]
push eax
call fcn.1001a6b0
mov ecx, eax
call fcn.1001a770
mov ebx, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
cmp edx, 8
jb 0x10012c70
mov ecx, dword [ebp - 0x24]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10012c66
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10012c66
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002167a
add esp, 8
xor eax, eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 7
mov word [ebp - 0x24], ax
test ebx, ebx
jne 0x10012ca1
mov dword [edi + 0x18], 3
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 esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CryptCATAdminCalcHashFromFileHandle
push ebx
call esi
push str.CryptCATAdminAcquireContext
push ebx
mov dword [edi], eax
call esi
push str.CryptCATAdminEnumCatalogFromHash
push ebx
mov dword [edi + 4], eax
call esi
push str.CryptCATCatalogInfoFromContext
push ebx
mov dword [edi + 8], eax
call esi
push str.CryptCATAdminReleaseContext
push ebx
mov dword [edi + 0xc], eax
call esi
push str.CryptCATAdminReleaseCatalogContext
push ebx
mov dword [edi + 0x10], eax
call esi
mov dword [edi + 0x14], 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 0x10019a60
Capabilities:
Check os version
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x140
mov eax, dword [0x10030008]
xor eax, esp
mov dword [esp + 0x13c], eax
push esi
mov esi, ecx
push 0x118
push 0
lea eax, [esi + 4]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esi], 0x11c
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x10019ba2
cmp dword [esi + 4], 6
push edi
ja 0x10019ab6
jne 0x10019b3e
cmp dword [esi + 8], 2
jb 0x10019b3e
push 0x10029c44
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
test edi, edi
je 0x10019b3e
push 0x10
push 1
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x10019b3e
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x10019b3e
movups xmm0, xmmword [0x10029c8c]
push eax
movups xmmword [esp + 0x128], xmm0
movups xmm0, xmmword [0x10029c9c]
movups xmmword [esp + 0x138], xmm0
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x10019b3e
lea eax, [esp + 0x124]
push eax
lea ecx, [edi + 6]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x10019b3e
cmp word [edi + 2], ax
jbe 0x10019b3e
movzx edx, word [edi + 0x32]
movzx ecx, word [edi + 0x30]
movzx eax, word [edi + 0x36]
mov dword [esi + 4], edx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], eax
push 0x10029c0c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x10029c20
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x10019b89
push 0x118
lea eax, [esp + 0x10]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 8], 0x11c
lea eax, [esp + 8]
push eax
call edi
test eax, eax
jne 0x10019b89
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
pop edi
mov al, 1
pop esi
mov ecx, dword [esp + 0x13c]
xor ecx, esp
call fcn.10021639
add esp, 0x140
ret
mov ecx, dword [esp + 0x140]
xor al, al
pop esi
xor ecx, esp
call fcn.10021639
add esp, 0x140
ret

Function at 0x1001c590
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [0x10030008]
xor eax, esp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x18]
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 8], eax
push esi
mov esi, dword [esp + 0x20]
xor ebx, ebx
push edi
cmp dword [ebp + 0x10], 0xffffffff
mov edi, dword [esp + 0x20]
je 0x1001c612
mov ecx, 0x100000
nop dword [eax]
nop word [eax + eax]
cmp esi, 0x100000
mov dword [esp + 0x14], 0
push 0
mov eax, esi
cmova eax, ecx
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x14]
add ebx, ecx
test eax, eax
je 0x1001c612
test ecx, ecx
je 0x1001c60e
add edi, ecx
sub esi, ecx
mov ecx, 0x100000
jne 0x1001c5d0
xor eax, eax
jmp 0x1001c617
mov eax, 1
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x1001c621
mov dword [ecx], ebx
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10021639
add esp, 0xc
ret 0xc
Function at 0x1001c9e0
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100258f8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x10030008]
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 edi, edx
mov esi, ecx
and edi, 0xffffb1af
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x1001ca1f
mov eax, dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
push eax
call ebx
test eax, eax
je 0x1001ca34
mov al, 1
jmp 0x1001cad9
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
lea edx, [ebp - 0x28]
mov ecx, esi
call fcn.1001d800
test al, al
je 0x1001ca7e
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push edi
cmovae eax, dword [ebp - 0x28]
push eax
call ebx
test eax, eax
je 0x1001ca7e
mov bl, 1
jmp 0x1001ca80
xor bl, bl
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x1001cac3
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1001cab9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1001cab9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002167a
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov al, bl
mov dword [ebp - 0x14], 7
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.10021639
mov esp, ebp
pop ebp
ret
Function at 0x1001cb00
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100258f8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x10030008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x1001cb36
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1001cbe6
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
lea edx, [ebp - 0x28]
mov ecx, esi
call fcn.1001d800
test al, al
je 0x1001cb8f
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x1001cbd2
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1001cbc8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1001cbc8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002167a
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10021639
mov esp, ebp
pop ebp
ret
Function at 0x1001dde0
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [0x10030008]
xor eax, esp
mov dword [esp + 4], eax
mov eax, dword [ecx]
push esi
push edi
mov edi, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x1001de45
lea ecx, [esp + 8]
mov dword [esp + 8], 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1001de20
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1001de45
mov eax, dword [esp + 8]
xor ecx, ecx
add ecx, esi
mov dword [edi], ecx
adc eax, 0
mov dword [edi + 4], eax
mov al, 1
pop edi
pop esi
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.10021639
add esp, 8
ret 4
mov ecx, dword [esp + 0xc]
xor al, al
pop edi
pop esi
xor ecx, esp
call fcn.10021639
add esp, 8
ret 4

Function at 0x1001ef40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10025e00
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x10030008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [edi]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x30], ecx
test esi, esi
je 0x1001f07f
cmp byte [esi + 0x54], 0
je 0x1001f07f
add esi, 0x1c
xor bl, bl
mov dword [ebp - 0x40], esi
mov byte [ebp - 0x3c], bl
test esi, esi
je 0x1001efc0
mov eax, dword [esi]
test eax, eax
je 0x1001efbd
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1001efb4
cmp eax, 0x80
je 0x1001efb4
xor bl, bl
jmp 0x1001efba
mov byte [esi + 4], 1
mov bl, 1
mov ecx, dword [ebp - 0x30]
mov byte [ebp - 0x3c], bl
push ecx
mov edx, ecx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.1001be00
add esp, 4
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0x18], 0x10
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], eax
mov eax, dword [edi]
cmp dword [eax + 0x14], 8
jb 0x1001eff7
mov eax, dword [eax]
push 0
push 0x80
push 4
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x1001f045
push 2
push 0
push 0
push edi
mov dword [ebp - 0x30], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x38]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.10016000
mov dword [ebp - 4], 2
test esi, esi
je 0x1001f071
test bl, bl
je 0x1001f071
mov eax, dword [esi]
test eax, eax
je 0x1001f06d
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov byte [esi + 4], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10021639
mov esp, ebp
pop ebp
ret 4
Function at 0x1001f330
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10025e40
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x10030008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi]
mov ebx, dword [ebp + 8]
test eax, eax
je 0x1001f373
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
push 0x2c
mov word [edi + 4], 0
mov dword [ebp - 0x18], 0
call fcn.1002164a
mov esi, eax
mov dword [ebp - 0x20], 0
add esp, 4
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x20], 0
mov dword [esi], 0
lea eax, [esi + 0x14]
mov dword [esi + 4], 0
mov dword [esi + 8], 0xc
mov dword [esi + 0xc], eax
xor eax, eax
push 0xc
push str.Advapi32.dll
mov dword [esi + 0x10], 0
mov dword [ebp - 0x1c], 7
mov word [ebp - 0x30], ax
call fcn.10006940
mov dword [ebp - 4], 0
lea eax, [ebp - 0x30]
push eax
call fcn.1001a6b0
mov ecx, eax
call fcn.1001a770
mov dword [esi + 0x28], eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1c]
cmp edx, 8
jb 0x1001f43e
mov ecx, dword [ebp - 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1001f434
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1001f434
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002167a
add esp, 8
xor eax, eax
mov dword [ebp - 0x20], 0
sub esp, 8
mov word [ebp - 0x30], ax
lea eax, [esi + 0x14]
mov dword [ebp - 0x1c], 7
lea ecx, [ebp - 0x18]
push eax
call fcn.10021410
mov esi, dword [ebp - 0x18]
mov dword [esi], eax
mov dword [ebp - 4], 1
cmp dword [esi], 0
je 0x1001f477
lea eax, [esi + 8]
jmp 0x1001f479
xor eax, eax
cmp dword [ebx + 0x10], 0
je 0x1001f489
cmp dword [ebx + 0x14], 8
jb 0x1001f48b
mov ebx, dword [ebx]
jmp 0x1001f48b
xor ebx, ebx
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [edi], eax
test eax, eax
je 0x1001f4ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1001f4ac
mov byte [edi + 5], 1
cmp dword [edi], 0
setne bl
mov dword [ebp - 4], 0xffffffff
mov eax, dword [esi]
test eax, eax
je 0x1001f4d5
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x1001f4ea
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 4], 0
push 0x2c
push esi
call fcn.1002167a
add esp, 8
mov dword [ebp - 0x18], 0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10021639
mov esp, ebp
pop ebp
ret 4