joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002a90
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x10031008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov eax, edx
mov dword [ebp - 0x1c], eax
push esi
mov esi, ecx
push edi
test eax, eax
je 0x10002ba5
test esi, esi
je 0x10002ba5
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x18]
push eax
push 0xf003f
xor edi, edi
push edi
push str.SYSTEMCurrentControlSetServices
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
call ebx
test eax, eax
jne 0x10002ba5
lea eax, [ebp - 0x14]
push eax
push 0xf003f
push edi
push esi
push dword [ebp - 0x18]
call ebx
lea ebx, [edi + 1]
test eax, eax
jne 0x10002b68
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
mov dword [ebp - 8], 0xffffffff
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0xc], 4
push eax
push edi
push 0x100286d8
push dword [ebp - 0x14]
mov dword [ebp - 0x10], 4
call esi
test eax, eax
jne 0x10002b68
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
jne 0x10002b46
mov eax, dword [ebp - 8]
test eax, eax
je 0x10002b4b
cmp eax, ebx
jmp 0x10002b49
cmp dword [ebp - 8], eax
jne 0x10002b68
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push 0x100286f0
push dword [ebp - 0x14]
call esi
test eax, eax
cmovne edi, ebx
mov eax, dword [ebp - 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x10002b78
push eax
call esi
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10002b82
push eax
call esi
test edi, edi
je 0x10002ba5
mov ecx, dword [ebp - 0x1c]
call fcn.10002bc0
test eax, eax
je 0x10002ba5
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100224d9
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100224d9
mov esp, ebp
pop ebp
ret
Function at 0x10011000
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 [0x10031008]
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 0x10011030
mov ecx, dword [ecx]
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
test esi, esi
je 0x1001110a
cmp dword [edi + 0x14], 8
jb 0x10011049
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 0x1001110a
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x1001110a
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x1001110a
cmp dword [ebx + 0x14], 8
jb 0x1001108f
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 0x1001110a
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 0x100110d1
cmp edi, dword [ebp - 8]
je 0x100110d5
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.100224d9
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.100224d9
mov esp, ebp
pop ebp
ret
Function at 0x100114b0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10025438
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x10031008]
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 0x1001157e
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 0x10011560
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.10007130
cmp dword [esi + 0x10], 0
je 0x1001170e
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.10007130
mov dword [ebp - 4], 1
lea eax, [ebp - 0x238]
push eax
mov edx, esi
lea ecx, [ebp - 0x258]
call fcn.1001a3e0
add esp, 4
mov edi, eax
mov byte [ebp - 4], 2
cmp esi, edi
je 0x1001161d
mov ecx, esi
call fcn.100070d0
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 0x10011663
mov ecx, dword [ebp - 0x258]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10011659
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10011659
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002251a
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 0x100116c5
mov ecx, dword [ebp - 0x238]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x100116bb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100116bb
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002251a
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.10019370
test al, al
jne 0x1001170e
mov ecx, esi
call fcn.100198b0
test al, al
jne 0x1001170e
cmp dword [esi + 0x14], 8
mov eax, esi
mov dword [esi + 0x10], 0
jb 0x10011709
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.100224d9
mov esp, ebp
pop ebp
ret
Function at 0x10013360
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 0x10013383
push str.Ktmw32.dll
call edi
mov dword [esi + 4], eax
test eax, eax
je 0x10013493
cmp dword [esi + 8], 0
jne 0x10013393
push str.Advapi32.dll
call edi
mov dword [esi + 8], eax
cmp dword [esi + 0xc], 0
jne 0x100133a3
push 0x100299c8
call edi
mov dword [esi + 0xc], eax
cmp dword [esi + 8], 0
je 0x10013493
cmp dword [esi + 0xc], 0
je 0x10013493
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 0x10013493
push str.RollbackTransaction
push dword [esi + 4]
call edi
mov dword [esi + 0x14], eax
test eax, eax
je 0x10013493
push str.CommitTransaction
push dword [esi + 4]
call edi
mov dword [esi + 0x18], eax
test eax, eax
je 0x10013493
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 0x100139f0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10025778
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x10031008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi], 0
jne 0x10013b28
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.10007130
mov dword [ebp - 4], 0
lea eax, [ebp - 0x24]
push eax
call fcn.1001b3e0
mov ecx, eax
call fcn.1001b4a0
mov ebx, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x10]
cmp edx, 8
jb 0x10013ab0
mov ecx, dword [ebp - 0x24]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10013aa6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10013aa6
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002251a
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 0x10013ae1
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 0x1001a790
Capabilities:
Check os version
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x140
mov eax, dword [0x10031008]
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 0x1001a8d2
cmp dword [esi + 4], 6
push edi
ja 0x1001a7e6
jne 0x1001a86e
cmp dword [esi + 8], 2
jb 0x1001a86e
push 0x1002a76c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
test edi, edi
je 0x1001a86e
push 0x10
push 1
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x1001a86e
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x1001a86e
movups xmm0, xmmword [0x1002a7b4]
push eax
movups xmmword [esp + 0x128], xmm0
movups xmm0, xmmword [0x1002a7c4]
movups xmmword [esp + 0x138], xmm0
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x1001a86e
lea eax, [esp + 0x124]
push eax
lea ecx, [edi + 6]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1001a86e
cmp word [edi + 2], ax
jbe 0x1001a86e
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 0x1002a734
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x1002a748
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x1001a8b9
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 0x1001a8b9
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.100224d9
add esp, 0x140
ret
mov ecx, dword [esp + 0x140]
xor al, al
pop esi
xor ecx, esp
call fcn.100224d9
add esp, 0x140
ret

Function at 0x1001d2c0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [0x10031008]
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 0x1001d342
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 0x1001d342
test ecx, ecx
je 0x1001d33e
add edi, ecx
sub esi, ecx
mov ecx, 0x100000
jne 0x1001d300
xor eax, eax
jmp 0x1001d347
mov eax, 1
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x1001d351
mov dword [ecx], ebx
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100224d9
add esp, 0xc
ret 0xc
Function at 0x1001d710
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10026848
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x10031008]
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 0x1001d74f
mov eax, dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
push eax
call ebx
test eax, eax
je 0x1001d764
mov al, 1
jmp 0x1001d809
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.1001e5e0
test al, al
je 0x1001d7ae
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push edi
cmovae eax, dword [ebp - 0x28]
push eax
call ebx
test eax, eax
je 0x1001d7ae
mov bl, 1
jmp 0x1001d7b0
xor bl, bl
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x1001d7f3
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1001d7e9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1001d7e9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002251a
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.100224d9
mov esp, ebp
pop ebp
ret
Function at 0x1001d830
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10026848
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x10031008]
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 0x1001d866
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1001d916
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.1001e5e0
test al, al
je 0x1001d8bf
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 0x1001d902
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1001d8f8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1001d8f8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002251a
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.100224d9
mov esp, ebp
pop ebp
ret
Function at 0x1001eb70
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [0x10031008]
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 0x1001ebd5
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 0x1001ebb0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1001ebd5
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.100224d9
add esp, 8
ret 4
mov ecx, dword [esp + 0xc]
xor al, al
pop edi
pop esi
xor ecx, esp
call fcn.100224d9
add esp, 8
ret 4

Function at 0x1001fdf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10026d50
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x10031008]
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 0x1001ff2f
cmp byte [esi + 0x54], 0
je 0x1001ff2f
add esi, 0x1c
xor bl, bl
mov dword [ebp - 0x40], esi
mov byte [ebp - 0x3c], bl
test esi, esi
je 0x1001fe70
mov eax, dword [esi]
test eax, eax
je 0x1001fe6d
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1001fe64
cmp eax, 0x80
je 0x1001fe64
xor bl, bl
jmp 0x1001fe6a
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.1001cb30
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 0x1001fea7
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 0x1001fef5
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.10016e40
mov dword [ebp - 4], 2
test esi, esi
je 0x1001ff21
test bl, bl
je 0x1001ff21
mov eax, dword [esi]
test eax, eax
je 0x1001ff1d
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.100224d9
mov esp, ebp
pop ebp
ret 4
Function at 0x10020210
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10026d90
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x10031008]
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 0x10020253
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.100224ea
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.10007130
mov dword [ebp - 4], 0
lea eax, [ebp - 0x30]
push eax
call fcn.1001b3e0
mov ecx, eax
call fcn.1001b4a0
mov dword [esi + 0x28], eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1c]
cmp edx, 8
jb 0x1002031e
mov ecx, dword [ebp - 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10020314
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10020314
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1002251a
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.100222b0
mov esi, dword [ebp - 0x18]
mov dword [esi], eax
mov dword [ebp - 4], 1
cmp dword [esi], 0
je 0x10020357
lea eax, [esi + 8]
jmp 0x10020359
xor eax, eax
cmp dword [ebx + 0x10], 0
je 0x10020369
cmp dword [ebx + 0x14], 8
jb 0x1002036b
mov ebx, dword [ebx]
jmp 0x1002036b
xor ebx, ebx
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [edi], eax
test eax, eax
je 0x1002038c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1002038c
mov byte [edi + 5], 1
cmp dword [edi], 0
setne bl
mov dword [ebp - 4], 0xffffffff
mov eax, dword [esi]
test eax, eax
je 0x100203b5
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 0x100203ca
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 4], 0
push 0x2c
push esi
call fcn.1002251a
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.100224d9
mov esp, ebp
pop ebp
ret 4