joyce8/EMBER2024-capa huggingface dataset:
Function at 0x408065
Capabilities:
Compare security identifiers

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
xor esi, esi
push esi
push esi
push 3
push esi
push esi
push 0x20000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4080f5
lea eax, [ebp - 8]
mov dword [ebp - 8], esi
push eax
push 0x40295c
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x4080d7
lea edx, [ebp - 4]
mov dword [ebp - 4], esi
mov ecx, edi
call fcn.00408ec6
mov esi, eax
test esi, esi
js 0x4080cc
push dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
push dword [ebp - 4]
neg eax
sbb esi, esi
inc esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4080ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4080ec
movzx esi, si
or esi, 0x80070000
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40810a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40810a
movzx esi, si
or esi, 0x80070000
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4084d6
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [0x40f014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x13c], ecx
xor edi, edi
mov ecx, 0x40f454
mov ebx, edx
inc edi
mov esi, 0x80004005
call fcn.00403cc2
cmp edi, 0x1f4
jg 0x408546
push edi
push 0x402970
push dword [ebp - 0x13c]
push 0x402974
push 0x104
push ebx
call fcn.00407222
add esp, 0x18
mov esi, eax
inc edi
test esi, esi
js 0x4085f7
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x408508
test esi, esi
js 0x4085f7
and dword [ebp - 0x134], 0
lea eax, [ebp - 0x138]
and dword [ebp - 0x138], 0
lea edx, [ebp - 0x130]
push eax
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0xd0]
push eax
lea ecx, [ebp - 0x148]
call fcn.004082e9
mov esi, eax
test esi, esi
js 0x4085f7
lea eax, [ebp - 0x148]
push eax
push ebx
push dword [ebp - 0x13c]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryExA]
test eax, eax
jne 0x4085c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4085c2
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4085cd
mov ecx, ebx
call fcn.00408112
mov esi, eax
cmp dword [ebp - 0x134], 0
je 0x4085e2
push dword [ebp - 0x134]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x138], 0
je 0x4085f7
push dword [ebp - 0x138]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, 0x40f454
call fcn.00403cde
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040dd40
mov esp, ebp
pop ebp
ret 4
Function at 0x408616
Capabilities:
Create directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x40f014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x14]
mov dword [ebp - 0x20], edx
push eax
mov dword [ebp - 0x24], ecx
mov esi, 0x80004005
xor ebx, ebx
xor edi, edi
call dword [sym.imp.RPCRT4.dll_UuidCreate]
test eax, eax
jne 0x40867f
and dword [ebp - 0x18], ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.RPCRT4.dll_UuidToStringW]
test eax, eax
jne 0x40867f
push dword [ebp - 0x18]
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
test eax, eax
je 0x40866e
mov ebx, eax
jmp 0x408673
mov edi, 0x8007000e
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.RPCRT4.dll_RpcStringFreeW]
jmp 0x40868e
jg 0x408685
mov edi, eax
jmp 0x40868e
movzx edi, ax
or edi, 0x80070000
test edi, edi
js 0x4086fc
and dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
mov edx, ebx
call fcn.004075b9
test eax, eax
js 0x4086f5
push dword [ebp - 0x1c]
mov edi, dword [ebp - 0x24]
push edi
push 0x402980
push 0x104
push dword [ebp - 0x20]
call fcn.00407222
add esp, 0x14
mov esi, eax
push dword [ebp - 0x1c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
js 0x4086f5
push 0
push dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryExA]
test eax, eax
jne 0x4086f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4086f5
movzx esi, si
or esi, 0x80070000
push ebx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040dd40
mov esp, ebp
pop ebp
ret 4
Function at 0x408773
Capabilities:
Copy file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x634
mov eax, dword [0x40f014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, edx
mov dword [ebp - 0x630], ecx
or esi, 0xffffffff
call dword [sym.imp.ole32.dll_CoImpersonateClient]
test eax, eax
js 0x4088d1
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
call dword [sym.imp.ole32.dll_CoRevertToSelf]
cmp esi, 0xffffffff
je 0x4088d1
test esi, esi
je 0x4088d1
mov ecx, edi
call fcn.004077d6
mov dword [ebp - 0x634], eax
cmp eax, edi
je 0x4088d1
mov edi, 0x104
lea eax, [ebp - 0x414]
push edi
push eax
push 0xffffffffffffffff
push dword [ebp - 0x630]
push 8
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x40881d
call fcn.00407404
mov edi, eax
jmp 0x4088d6
push dword [ebp - 0x634]
lea eax, [ebp - 0x414]
push eax
push 0x402988
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.00403c18
mov edi, eax
add esp, 0x14
test edi, edi
js 0x4088d6
lea ecx, [ebp - 0x20c]
call fcn.004034e0
mov edi, eax
test edi, edi
js 0x4088d6
lea ecx, [ebp - 0x20c]
call fcn.00408dd2
push 0
push 0x10c
lea eax, [ebp - 0x62c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFinalPathNameByHandleW]
cmp eax, 3
je 0x4088d1
cmp eax, 8
je 0x4088d1
cmp eax, 0x57
je 0x4088d1
push 1
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x62c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x408811
lea ecx, [ebp - 0x20c]
call fcn.00407fb1
mov edi, eax
test edi, edi
js 0x4088d6
push dword [ebx]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [ebx], eax
jmp 0x4088d6
mov edi, 0x80004005
cmp esi, 0xffffffff
je 0x4088e6
test esi, esi
je 0x4088e6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040dd40
mov esp, ebp
pop ebp
ret 4
Function at 0x4088fb
Capabilities:
Check if file exists
Copy file
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x40f014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
xor esi, esi
inc esi
mov ecx, dword [edi]
call fcn.004077d6
mov dword [ebp - 0x418], eax
cmp eax, dword [edi]
je 0x408a08
push 0x104
lea eax, [ebp - 0x414]
push eax
push 0xffffffffffffffff
push ebx
push 8
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x408956
call fcn.00407404
jmp 0x408a0d
mov ebx, dword [ebp - 0x418]
cmp esi, 0x1f4
jg 0x408a08
push ebx
push esi
lea eax, [ebp - 0x414]
push eax
push 0x40299c
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00403c18
add esp, 0x18
inc esi
test eax, eax
js 0x4089a1
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40895c
lea ecx, [ebp - 0x20c]
call fcn.0040d306
mov esi, eax
test esi, esi
js 0x408a04
lea ecx, [ebp - 0x20c]
call fcn.00408d6a
mov esi, eax
test esi, esi
js 0x408a04
push 1
lea eax, [ebp - 0x20c]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40894c
lea ecx, [ebp - 0x20c]
call fcn.00407fb1
mov esi, eax
test esi, esi
js 0x408a04
push dword [edi]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [edi], eax
mov eax, esi
jmp 0x408a0d
mov eax, 0x80004005
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040dd40
mov esp, ebp
pop ebp
ret
Function at 0x408a1e
Capabilities:
Enumerate files on windows
Get common file path
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x364
mov eax, dword [0x40f014]
xor eax, esp
mov dword [esp + 0x360], eax
push ebx
push esi
push edi
lea eax, [esp + 0x260]
mov ebx, 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x408a73
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x408bdb
movzx esi, si
or esi, 0x80070000
jmp 0x408bdb
push ecx
lea eax, [esp + 0x264]
mov edx, ebx
push eax
push 0
lea ecx, [esp + 0x164]
call fcn.004072c5
mov esi, eax
test esi, esi
js 0x408bdb
push 0x4029b0
mov edx, ebx
lea ecx, [esp + 0x15c]
call fcn.004071d2
mov esi, eax
test esi, esi
js 0x408bdb
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x408a55
push 0x40294c
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x408ba0
push 0x402950
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x408ba0
lea eax, [esp + 0x158]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x158]
push 0
lea eax, [esp + 0x14]
mov edx, ebx
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x26c]
push eax
call fcn.00406fd3
mov esi, eax
test esi, esi
js 0x408bd4
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x10]
mov ecx, dword [esp + 0x14]
push 0
push eax
lea eax, [esp + 0x1c]
push eax
push 0x4029b8
call fcn.00406fd3
mov esi, eax
test esi, esi
js 0x408bd4
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x44]
mov ecx, dword [esp + 0x14]
push eax
call fcn.00406f9f
mov esi, eax
test esi, esi
js 0x408bd4
test byte [esp + 0x18], 0x10
je 0x408ba0
push 0x90
lea eax, [esp + 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x158]
call fcn.00407d65
mov esi, eax
test esi, esi
js 0x408bd4
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x408acd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x408bd4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x408bd4
movzx esi, si
or esi, 0x80070000
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x36c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040dd40
mov esp, ebp
pop ebp
ret
Function at 0x4092de
Capabilities:
Compare security identifiers

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
xor esi, esi
mov ebx, ecx
push esi
push 0x2000000
push 3
push esi
push esi
push 0x20000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x409379
lea eax, [ebp - 8]
mov dword [ebp - 8], esi
push eax
push 0x402ad8
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x409372
lea edx, [ebp - 4]
mov dword [ebp - 4], esi
mov ecx, edi
call fcn.00408ec6
test eax, eax
js 0x409345
push dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
mov esi, eax
neg esi
sbb esi, esi
inc esi
jmp 0x40935a
cmp eax, 0x8007053c
jne 0x40935a
mov ecx, ebx
call fcn.0040cfb2
test eax, eax
je 0x40935a
xor esi, esi
inc esi
cmp dword [ebp - 4], 0
je 0x409369
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x409a3f
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x10]
stosd dword es:[edi], eax
xor esi, esi
push esi
push esi
mov dword [ebp - 4], esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
push eax
push 0x409970
push esi
push esi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], edx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test esi, esi
je 0x409ab4
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x409aa8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x409aa5
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 4], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
jmp 0x409ac6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x409ac6
movzx eax, ax
or eax, 0x80070000
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x40a455
Capabilities:
Delete registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x40f014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea esi, [ebp + 8]
lea edi, [ebp - 0x64]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x78]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea esi, [ebp + 0x18]
lea edi, [ebp - 0x74]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, 0xf003f
xor esi, esi
push edi
push esi
push 0x402660
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
test ebx, ebx
jne 0x40a4c9
push 0x27
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push dword [ebp - 0x78]
mov ebx, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x7c]
push eax
push edi
push esi
push 0x402bfc
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
jne 0x40a50d
push 0x27
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push dword [ebp - 0x7c]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x40a51b
test edi, edi
je 0x40a535
jg 0x40a52c
mov esi, edi
jmp 0x40a535
test edi, edi
jne 0x40a515
test ebx, ebx
jg 0x40a527
mov esi, ebx
jmp 0x40a535
movzx esi, bx
jmp 0x40a52f
movzx esi, di
or esi, 0x80070000
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040dd40
mov esp, ebp
pop ebp
ret 0x20

Function at 0x40a9dc
Capabilities:
Parse pe header

Disassembly:
push 0x24
push 0x40e438
call fcn.0040e2fc
mov edi, edx
push 0x1c
lea eax, [ebp - 0x34]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
and dword [ebp - 4], 0
mov eax, 0x5a4d
mov ecx, dword [ebp - 0x30]
cmp word [ecx], ax
jne 0x40aa52
mov edx, dword [ecx + 0x3c]
cmp dword [edx + ecx], 0x4550
jne 0x40aa52
mov esi, dword [edx + ecx + 0xd8]
lea eax, [esi + ecx]
cmp edi, eax
jb 0x40aa52
mov eax, dword [edx + ecx + 0xdc]
add eax, esi
add eax, ecx
cmp edi, eax
jae 0x40aa52
mov dword [ebp - 4], 0xfffffffe
mov al, 1
jmp 0x40aa5b
mov dword [ebp - 4], 0xfffffffe
xor al, al
call fcn.0040e341
ret
Function at 0x40aaf5
Capabilities:
Allocate or change rwx memory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, ecx
mov ebx, edx
movzx eax, si
push edi
mov edi, 0x10000
test eax, eax
je 0x40ab7d
sub esi, eax
add esi, edi
jmp 0x40ab7d
lea eax, [esi - 0x50000000]
cmp eax, 0x30000000
ja 0x40ab2a
mov esi, 0x80010000
jmp 0x40ab7d
push 7
pop ecx
xor eax, eax
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
push 0x1c
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40ab81
mov ecx, dword [ebp - 0x10]
mov edi, 0x10000
cmp dword [ebp - 0xc], edi
jne 0x40ab6b
cmp ecx, edi
jb 0x40ab6b
push 0x40
push 0x3000
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x40ab83
jmp 0x40ab12
mov esi, dword [ebp - 0x1c]
add esi, ecx
movzx ecx, si
test ecx, ecx
je 0x40ab7d
mov eax, edi
sub eax, ecx
add esi, eax
cmp esi, ebx
jb 0x40ab16
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40ab8a
Capabilities:
Allocate or change rwx memory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov ebx, ecx
lea esi, [edx - 0x10000]
jmp 0x40abfd
lea eax, [esi - 0x50000000]
cmp eax, 0x30000000
ja 0x40abb3
mov esi, 0x4fff0000
jmp 0x40ac06
push 7
pop ecx
xor eax, eax
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
push 0x1c
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40ac0a
mov edi, 0x10000
cmp dword [ebp - 0xc], edi
jne 0x40abf4
cmp dword [ebp - 0x10], edi
jb 0x40abf4
push 0x40
push 0x3000
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x40ac0c
sub esi, edi
jmp 0x40ac06
mov esi, dword [ebp - 0x18]
add esi, 0xffff0000
movzx eax, si
test eax, eax
je 0x40ac06
sub esi, eax
cmp esi, ebx
ja 0x40ab9f
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ac13
Capabilities:
Hook routines via microsoft detours

Disassembly:
mov edi, edi
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi - 0x7ff80000]
cmp esi, 0x7ff80000
ja 0x40ac2d
mov ebx, 0x10000
lea edi, [esi + 0x7ff80000]
cmp esi, 0x80000000
jb 0x40ac40
mov edi, 0xfff80000
mov edx, dword [0x40f49c]
mov eax, dword [0x40f494]
test edx, edx
jne 0x40ac5b
test eax, eax
je 0x40ac6e
mov edx, eax
mov dword [0x40f49c], edx
mov ecx, dword [edx + 8]
test ecx, ecx
je 0x40ac6e
cmp ecx, ebx
jb 0x40ac6e
cmp ecx, edi
jbe 0x40ad62
mov edx, eax
test eax, eax
jmp 0x40ac90
test edx, edx
je 0x40ac8b
mov eax, dword [edx + 8]
test eax, eax
je 0x40ac8b
cmp eax, ebx
jb 0x40ac8b
cmp eax, edi
jbe 0x40ad62
mov edx, dword [edx + 4]
test edx, edx
mov dword [0x40f49c], edx
jne 0x40ac74
and esi, 0xffff0000
cmp esi, 0x40000000
jbe 0x40acbf
lea edx, [esi - 0x40000000]
mov ecx, ebx
call fcn.0040ab8a
mov edx, eax
test edx, edx
jne 0x40ad28
cmp esi, 0x40000000
jae 0x40acd4
lea ecx, [esi + 0x40000000]
mov edx, edi
call fcn.0040aaf5
mov edx, eax
test edx, edx
jne 0x40ad28
cmp esi, 0x40000000
jbe 0x40acf5
lea ecx, [esi - 0x40000000]
mov edx, esi
call fcn.0040aaf5
mov edx, eax
test edx, edx
jne 0x40ad28
cmp esi, 0x40000000
jae 0x40ad0a
lea edx, [esi + 0x40000000]
mov ecx, esi
call fcn.0040ab8a
mov edx, eax
test edx, edx
jne 0x40ad28
mov edx, esi
mov ecx, ebx
call fcn.0040ab8a
mov edx, eax
test edx, edx
jne 0x40ad28
mov edx, edi
mov ecx, esi
call fcn.004034e0
mov edx, eax
test edx, edx
je 0x40ad87
xor ecx, ecx
mov dword [edx], 0x52727464
mov dword [edx + 8], ecx
mov esi, 0x38b
mov eax, dword [0x40f494]
mov dword [edx + 4], eax
lea eax, [edx + 0xffa8]
mov dword [0x40f49c], edx
mov dword [0x40f494], edx
mov dword [eax + 0x40], ecx
mov ecx, eax
sub eax, 0x48
sub esi, 1
jne 0x40ad52
mov dword [edx + 8], ecx
mov esi, dword [edx + 8]
cmp esi, ebx
jb 0x40ad87
cmp esi, edi
ja 0x40ad87
mov ecx, dword [esi + 0x40]
push 0x48
push 0xcc
push esi
mov dword [edx + 8], ecx
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, esi
jmp 0x40ad89
xor eax, eax
pop edi
pop esi
pop ebx
ret

Function at 0x40ae18
Capabilities:
Allocate or change rwx memory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
cmp dword [0x40f4a4], 0
je 0x40ae2e
mov eax, 0x10dd
jmp 0x40ae83
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
mov edx, 0x40f4a4
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x40ae27
push esi
mov esi, dword [0x40f494]
mov dword [0x40f484], eax
mov dword [0x40f48c], eax
mov dword [0x40f4a0], eax
mov dword [0x40f4a8], eax
mov dword [0x40f498], eax
jmp 0x40ae7c
lea eax, [ebp - 4]
push eax
push 0x40
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [esi + 4]
test esi, esi
jne 0x40ae67
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40ae87
Capabilities:
Resume thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x40f4a4], eax
je 0x40aea5
mov eax, 0x10dd
jmp 0x40af5a
push ebx
push esi
mov esi, dword [0x40f4a0]
push edi
jmp 0x40aebb
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [esi]
test esi, esi
jne 0x40aeb0
mov edi, dword [0x40f48c]
test edi, edi
je 0x40aef1
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edi, dword [edi]
test edi, edi
jne 0x40aec9
mov edi, dword [0x40f48c]
test edi, edi
je 0x40aef1
mov esi, dword [edi]
mov ecx, edi
call fcn.00403541
mov edi, esi
test esi, esi
jne 0x40aee2
mov edi, dword [0x40f484]
xor ebx, ebx
mov dword [0x40f48c], ebx
mov dword [0x40f4a0], ebx
test edi, edi
je 0x40af44
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [edi + 4], ebx
jne 0x40af35
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x40af35
call fcn.0040ad8d
mov dword [edi + 0x10], ebx
mov esi, dword [edi]
mov ecx, edi
call fcn.00403541
mov edi, esi
test esi, esi
jne 0x40af09
mov dword [0x40f484], ebx
call fcn.0040aab0
pop edi
pop esi
mov dword [0x40f4a4], ebx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40b2a0
Capabilities:
Suspend thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x40f4a8]
push ebx
mov ebx, ecx
test eax, eax
jne 0x40b323
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
cmp ebx, eax
jne 0x40b2c0
xor eax, eax
jmp 0x40b323
push esi
push edi
push 8
pop esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x40b2fe
push ebx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x40b2f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, edi
mov esi, eax
call fcn.00403541
jmp 0x40b2fa
mov esi, dword [ebp - 4]
test esi, esi
je 0x40b30f
and dword [0x40f498], 0
mov eax, esi
mov dword [0x40f4a8], esi
jmp 0x40b321
mov eax, dword [0x40f48c]
mov dword [edi], eax
xor eax, eax
mov dword [edi + 4], ebx
mov dword [0x40f48c], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret