joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40d84d
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x42ac40]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0040d78c
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.0040e680
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x40d89c
cmp dword [ebp - 0x1c], 5
jb 0x40d8b4
jmp 0x40d8b0
cmp dword [ebp - 0x10], 1
jne 0x40d8b4
cmp dword [ebp - 0x1c], 4
ja 0x40d8b0
jne 0x40d8b4
cmp dword [ebp - 0x18], 0
jbe 0x40d8b4
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x420030
call fcn.00401af9
test eax, eax
jge 0x40d8d5
mov byte [0x42bc08], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0040e42e
add ebp, 0x78
leave
ret

Function at 0x40db99
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x42bdb8], 0
push esi
jne 0x40db0c
call fcn.0040da37
test eax, eax
je 0x40db4f
mov eax, dword [0x42bdb8]
cmp eax, 1
jne 0x40db2d
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x40db4f
pop esi
ret
push eax
call dword [0x42bdc0]
test eax, eax
jne 0x40db97
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x40db53
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x42bdb8]
call dword [0x42bdc0]
mov edi, eax
test edi, edi
je 0x40db7a
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x40db96
lea edi, [esi + 0xff0]
push esi
push dword [0x42bdb8]
call dword [fcn.0042bdbc]
add esi, 0x10
cmp esi, edi
jb 0x40db80
mov eax, esi
pop edi
pop esi
ret
jmp 0x40daf9

Function at 0x40e42e
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x42ac40]
jne 0x40e438
repz ret
jmp fcn.0041460c
Function at 0x415a0c
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x42b578]
je 0x415a27
inc edi
cmp edi, 0x17
jb 0x415a18
cmp edi, 0x17
jae 0x415ba7
push ebp
push 3
call fcn.00419670
cmp eax, 1
pop ecx
je 0x415b73
push 3
call fcn.00419670
test eax, eax
pop ecx
jne 0x415a5b
cmp dword [0x42ac70], 1
je 0x415b73
cmp ebx, 0xfc
je 0x415ba6
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x42c318
push ebp
call fcn.00416589
add esp, 0xc
test eax, eax
je 0x415a91
push esi
push esi
push esi
push esi
push esi
call fcn.0041082e
add esp, 0x14
push 0x104
mov esi, 0x42c331
push esi
push 0
mov byte [0x42c435], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x415ad5
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00416589
add esp, 0xc
test eax, eax
je 0x415ad5
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0041082e
add esp, 0x14
push esi
call fcn.00410ba0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x415b1a
push esi
call fcn.00410ba0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x42c62c
push 0x4207c4
sub ecx, eax
push ecx
push eax
call fcn.00419096
add esp, 0x14
test eax, eax
je 0x415b1a
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0041082e
add esp, 0x14
jmp 0x415b1c
xor esi, esi
push 0x4207c0
push ebx
push ebp
call fcn.00418fdd
add esp, 0xc
test eax, eax
je 0x415b3c
push esi
push esi
push esi
push esi
push esi
call fcn.0041082e
add esp, 0x14
push dword [edi*8 + 0x42b57c]
push ebx
push ebp
call fcn.00418fdd
add esp, 0xc
test eax, eax
je 0x415b5e
push esi
push esi
push esi
push esi
push esi
call fcn.0041082e
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004194b3
add esp, 0xc
jmp 0x415ba6
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x415ba6
cmp ebp, 0xffffffff
je 0x415ba6
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x42b57c]
push dword [esi]
call fcn.00410ba0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4194b3
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00414045
xor ebx, ebx
cmp dword [0x42c8bc], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x419589
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x419669
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x419669
push eax
call fcn.00413fd7
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x42c8bc], eax
call esi
push eax
call fcn.00413fd7
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x42c8c0], eax
call esi
push eax
call fcn.00413fd7
mov dword [0x42c8c4], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0041488c
test eax, eax
pop ecx
pop ecx
je 0x419557
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0041082e
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x419589
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00413fd7
cmp eax, ebx
pop ecx
mov dword [0x42c8cc], eax
je 0x419589
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00413fd7
pop ecx
mov dword [0x42c8c8], eax
mov eax, dword [0x42c8c8]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x41960e
cmp dword [0x42c8cc], ecx
je 0x41960e
push eax
call fcn.0041404e
push dword [0x42c8cc]
mov esi, eax
call fcn.0041404e
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x41960e
cmp edi, ebx
je 0x41960e
call esi
cmp eax, ebx
je 0x4195db
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4195db
test byte [ebp - 0x18], 1
jne 0x41960e
lea eax, [ebp - 0x10]
push eax
call fcn.004148c3
test eax, eax
pop ecx
je 0x4195f6
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0041082e
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x419605
or dword [ebp + 0x10], 0x200000
jmp 0x419649
or dword [ebp + 0x10], 0x40000
jmp 0x419649
mov eax, dword [0x42c8c0]
cmp eax, dword [ebp - 8]
je 0x419649
push eax
call fcn.0041404e
cmp eax, ebx
pop ecx
je 0x419649
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x419649
mov eax, dword [0x42c8c4]
cmp eax, dword [ebp - 8]
je 0x419649
push eax
call fcn.0041404e
cmp eax, ebx
pop ecx
je 0x419649
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x42c8bc]
call fcn.0041404e
cmp eax, ebx
pop ecx
je 0x419669
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x41966b
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403891
Capabilities:
Get system information on windows

Disassembly:
push esi
sub esp, 0x24
mov esi, esp
xorps xmm0, xmm0
and dword [esi + 0x20], 0
movups xmmword [esi + 0x10], xmm0
movups xmmword [esi], xmm0
push esi
call sub.kernel32.dll_GetNativeSystemInfo
movzx eax, word [esi]
xor ecx, ecx
test ax, ax
sete cl
shl ecx, 5
cmp ax, 9
push 0x40
pop eax
cmovne eax, ecx
add esp, 0x24
pop esi
ret
Function at 0x403f5d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x34
lea eax, [ebp - 0x18]
add edx, ecx
lea edi, [ebp - 0x40]
mov dword [eax - 4], esp
or dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x418200
mov esi, dword fs:[0]
mov dword [eax], esi
mov dword fs:[0], eax
mov dword [edi + 4], ecx
mov dword [edi + 8], edx
and word [edi + 0xc], 0
and dword [eax + 8], 0
lea ecx, [ebp - 0x30]
mov edx, edi
mov dword [edi], 1
call fcn.004018ff
mov eax, dword [ebp - 0x2c]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov dword [ebp - 0x20], eax
push eax
call sub.kernel32.dll_CreateFileW
cmp eax, 0xffffffff
je 0x404007
mov ebx, dword [ebp + 8]
mov esi, eax
and dword [ebp - 0x40], 0
mov eax, dword [ebx + 4]
push 0
lea ecx, [ebp - 0x40]
push ecx
push dword [ebx + 8]
mov dword [ebp - 0x24], eax
push eax
push esi
call sub.kernel32.dll_WriteFile
mov edi, eax
push esi
call sub.kernel32.dll_CloseHandle
test edi, edi
je 0x404022
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x20]
call fcn.0040fb63
xor esi, esi
jmp 0x404040
mov dword [ebp - 0x10], 1
call fcn.004093a3
mov ebx, dword [ebp + 8]
mov esi, eax
mov edi, edx
mov eax, dword [ebx + 4]
mov dword [ebp - 0x24], eax
jmp 0x404035
mov dword [ebp - 0x10], 1
call fcn.004093a3
mov ebx, dword [ebp + 8]
mov esi, eax
mov edi, edx
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x20]
call fcn.0040fb63
mov ecx, dword [ebx]
mov edx, dword [ebp - 0x24]
call fcn.00409307
mov eax, dword [ebp - 0x18]
mov edx, edi
mov dword fs:[0], eax
mov eax, esi
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40408f
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x58
lea esi, [ebp - 0x18]
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp + 8]
mov dword [esi - 4], esp
or dword [esi + 8], 0xffffffff
mov dword [esi + 4], 0x418210
mov ecx, dword fs:[0]
mov dword [esi], ecx
mov dword fs:[0], esi
and dword [ebp - 0x30], 0
lea ecx, [ebp - 0x58]
push eax
call fcn.0040390a
pop eax
and dword [esi + 8], 0
sub esp, 4
and dword [esp], 0
xor edx, edx
lea ecx, [ebp - 0x48]
inc edx
call fcn.0040390a
pop eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x10], 1
lea ecx, [ebp - 0x3c]
push eax
call fcn.0040390a
pop eax
mov esi, dword [ebp - 0x54]
lea eax, [ebp - 0x30]
push 0
push eax
push 0
push 0x20106
push 0
push 0
push 0
push esi
push 0x80000001
call sub.ADVAPI32.dll_RegCreateKeyExW
test eax, eax
je 0x40415a
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], 2
sub esp, 4
and dword [esp], 0
xor edx, edx
lea ecx, [ebp - 0x64]
inc edx
call fcn.00409436
pop eax
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x24]
movsd xmm0, qword [ebp - 0x64]
mov edx, dword [ebp - 0x38]
mov edi, dword [ebp - 0x44]
mov esi, dword [ebp - 0x20]
mov dword [ecx + 8], eax
movsd qword [ecx], xmm0
jmp 0x4041c2
mov eax, dword [ebp - 0x34]
mov edi, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x44]
add eax, eax
push eax
push ebx
push 1
push 0
mov dword [ebp - 0x2c], ecx
push ecx
push edi
call sub.ADVAPI32.dll_RegSetValueExW
test eax, eax
je 0x4041ef
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], 3
sub esp, 4
and dword [esp], 0
xor edx, edx
lea ecx, [ebp - 0x64]
inc edx
call fcn.00409436
pop eax
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x24]
movsd xmm0, qword [ebp - 0x64]
mov dword [ecx + 8], eax
movsd qword [ecx], xmm0
push dword [ebp - 0x28]
call sub.ADVAPI32.dll_RegCloseKey
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x3c]
call fcn.0040fb63
mov ecx, dword [ebp - 0x48]
mov edx, edi
call fcn.0040fb63
mov ecx, dword [ebp - 0x58]
mov edx, esi
call fcn.0040fb63
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x58
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp - 0x24]
mov dword [eax], 0x80000000
push edi
call sub.ADVAPI32.dll_RegCloseKey
mov ecx, dword [ebp - 0x3c]
mov edx, ebx
call fcn.0040fb63
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x2c]
jmp 0x4041cf
Function at 0x404553
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
lea eax, [ebp - 0x18]
mov esi, ecx
mov dword [eax - 4], esp
or dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x418230
mov ecx, dword fs:[0]
mov dword [eax], ecx
mov dword fs:[0], eax
lea eax, [ebp - 0x20]
and dword [eax], 0
push eax
push 0
push 0
push 0x428420
call sub.shell32.dll_SHGetKnownFolderPath
test eax, eax
je 0x4045cc
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x24], esi
call fcn.004010fc
and dword [ebp - 0x10], 0
push 8
pop ecx
call fcn.00401c1c
movsd xmm0, qword [ebp - 0x2c]
mov ecx, dword [ebp - 0x24]
movsd qword [eax], xmm0
mov dword [ecx + 4], eax
mov dword [ecx + 8], 0x428470
mov dword [ecx], 0x80000000
jmp 0x4045f2
mov edx, dword [ebp - 0x20]
xor eax, eax
dec eax
cmp word [edx + eax*2 + 2], 0
lea eax, [eax + 1]
jne 0x4045d2
or dword [ebp - 0x10], 0xffffffff
mov ecx, esi
push eax
call fcn.0041031f
pop eax
push dword [ebp - 0x20]
call sub.ole32.dll_CoTaskMemFree
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x404694
Capabilities:
Set registry value

Disassembly:
push ebx
push edi
push esi
sub esp, 0x1c
mov esi, ecx
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov ebx, edx
lea edx, [esp + 0xc]
mov edi, esp
add ecx, eax
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
and word [edx + 0xc], 0
mov ecx, edi
mov dword [edx], 1
call fcn.004017c5
mov edi, dword [edi + 4]
push 4
pop eax
lea ecx, [esp + 0x34]
push eax
push ecx
push eax
push 0
push edi
push ebx
call sub.ADVAPI32.dll_RegSetValueExW
test eax, eax
je 0x4046e9
mov ecx, esi
call fcn.004010eb
jmp 0x4046ec
mov byte [esi], 4
mov ecx, dword [esp]
mov edx, edi
call fcn.0040fb63
add esp, 0x1c
pop esi
pop edi
pop ebx
ret
Function at 0x4046fd
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x30
lea eax, [ebp - 0x18]
add edx, ecx
lea edi, [ebp - 0x3c]
mov dword [eax - 4], esp
or dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x418240
mov esi, dword fs:[0]
mov dword [eax], esi
mov dword fs:[0], eax
mov dword [edi + 4], ecx
mov dword [edi + 8], edx
and word [edi + 0xc], 0
lea esi, [ebp - 0x2c]
mov edx, edi
mov dword [edi], 1
mov ecx, esi
call fcn.004017c5
mov ebx, dword [esi + 4]
push ebx
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x40476f
test al, 0x10
jne 0x404789
and dword [ebp - 0x10], 0
mov dword [ebp - 0x20], ebx
call fcn.004093a3
mov esi, eax
mov edi, 0x428ddc
jmp 0x4047b7
push 0
push ebx
call sub.kernel32.dll_CreateDirectoryW
test eax, eax
je 0x40478d
mov ecx, dword [ebp - 0x2c]
mov edx, ebx
call fcn.0040fb63
xor esi, esi
jmp 0x4047c4
xor esi, esi
jmp 0x4047ba
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x20], ebx
call fcn.004010eb
mov dword [ebp - 0x10], 1
push 8
pop ecx
call fcn.00401c1c
movsd xmm0, qword [ebp - 0x3c]
mov esi, eax
mov edi, 0x428470
movsd qword [eax], xmm0
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
mov edx, ebx
call fcn.0040fb63
mov eax, dword [ebp - 0x18]
mov edx, edi
mov dword fs:[0], eax
mov eax, esi
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x404806
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x150
lea eax, [ebp - 0x18]
lea esi, [ebp - 0x158]
mov dword [eax - 4], esp
or dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x418250
mov ecx, dword fs:[0]
mov dword [eax], ecx
mov dword fs:[0], eax
push 0xc8
push 0
push esi
call fcn.00419270
add esp, 0xc
xorps xmm0, xmm0
lea eax, [0x423bd5]
lea edx, [ebp - 0x5c]
mov dword [esi - 4], 0xcc
mov dword [esi + 0x28], 1
mov dword [edx], eax
movups xmmword [ebp - 0x4c], xmm0
lea eax, [ebp - 0x5c]
mov ecx, dword [edx]
mov dword [edx], 0x2a9b34c0
mov edx, dword [eax]
call fcn.00401f69
xorps xmm0, xmm0
xor ecx, ecx
movups xmmword [ebp - 0x90], xmm0
movups xmmword [ebp - 0x80], xmm0
movups xmmword [ebp - 0x70], xmm0
cmp ecx, 0x2f
ja 0x4048a8
mov edx, dword [ecx + 0x4285dd]
xor edx, dword [eax + ecx]
mov dword [ebp + ecx - 0x90], edx
add ecx, 4
jmp 0x40488e
movzx ecx, byte [eax + 0x32]
movzx eax, word [eax + 0x30]
or dword [ebp - 0x10], 0xffffffff
lea edx, [ebp - 0x90]
lea esi, [ebp - 0x3c]
xor eax, 0xf87d
xor cl, 0x51
mov word [edx + 0x30], ax
mov byte [edx + 0x32], cl
mov ecx, esi
push 0x33
call fcn.00409436
pop eax
mov ecx, dword [esi + 4]
mov eax, dword [esi + 8]
lea edx, [ebp - 0x5c]
and dword [ebp - 0x10], 0
add eax, ecx
mov dword [edx + 4], ecx
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x30]
mov dword [edx + 8], eax
and word [edx + 0xc], 0
mov dword [edx], 1
call fcn.004018ff
mov esi, dword [ebp - 0x2c]
lea eax, [ebp - 0x4c]
lea ecx, [ebp - 0x15c]
push eax
push ecx
push 0
push 0
push 0x8000000
push 0
push 0
push 0
push esi
push 0
call sub.kernel32.dll_CreateProcessW
test eax, eax
je 0x404953
push dword [ebp - 0x4c]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 0x48]
call sub.kernel32.dll_CloseHandle
mov ecx, dword [ebp - 0x30]
mov edx, esi
call fcn.0040fb63
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x20]
call fcn.00409307
xor esi, esi
jmp 0x40497a
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x10], 1
call fcn.004093a3
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x24]
mov esi, eax
call fcn.0040fb63
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x20]
call fcn.00409307
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, esi
add esp, 0x150
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x408a50
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x70
mov esi, esp
mov dword [esi + 0x58], ebp
mov dword [esi + 0x5c], esp
mov dword [esi + 0x68], 0xffffffff
mov dword [esi + 0x64], 0x418270
lea eax, [esi + 0x60]
mov ecx, dword fs:[0]
mov dword [esi + 0x60], ecx
mov dword fs:[0], eax
push 0x413205
push 0
call dword [sym.imp.kernel32.dll_AddVectoredExceptionHandler]
lea eax, [esi + 0x3c]
mov dword [esi + 0x3c], 0x5000
push eax
call dword [sym.imp.kernel32.dll_SetThreadStackGuarantee]
call dword [sym.imp.kernel32.dll_GetCurrentThread]
mov ecx, dword [0x435054]
push 0x42c98c
push eax
call ecx
lea ecx, [esi + 0x3c]
mov dword [esi + 0x3c], 0
mov dword [esi + 0x68], 0
call fcn.00411e1c
movsd xmm0, qword [eax + 8]
mov ebx, eax
mov dword [esi + 0x2c], eax
lea eax, [esi + 0x18]
mov dword [esi + 0x30], eax
movsd qword [esi + 0x18], xmm0
mov eax, dword [0x435a38]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
movzx eax, byte [eax + 0x3c]
test eax, eax
je 0x408b2b
cmp eax, 1
je 0x408b71
lea ecx, [esi + 0x2c]
call fcn.00411d90
lea eax, [esi + 4]
mov ecx, 0x42b0eb
mov edx, 0x46
push 0x42b1a8
push 0x42aca4
push eax
call fcn.00426cd9
add esp, 0xc
ud2
mov dword [esi + 8], ebx
mov byte [esi + 3], 1
mov dword [esi + 0x68], 1
mov edx, 0x41204c
mov eax, dword [0x435a38]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
lea ecx, [eax + 0x38]
call fcn.00412059
mov eax, dword [0x435a38]
mov ecx, dword fs:[0x2c]
mov ebx, dword [esi + 8]
mov eax, dword [ecx + eax*4]
mov byte [eax + 0x3c], 1
mov eax, dword [0x435a38]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
cmp dword [eax + 0x38], 0
jne 0x408bfb
mov eax, dword [0x435a38]
mov ecx, dword fs:[0x2c]
mov edi, dword [ecx + eax*4]
lea ecx, [edi + 0x38]
call fcn.00411dd1
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
mov dword [edi + 0x38], ebx
mov dword [esi + 0xc], 0
call fcn.00411d72
lea ecx, [esi + 0xc]
call fcn.00411dd1
mov ecx, 0x4049be
mov dword [esi + 0x68], 7
call fcn.004011e5
mov dword [esi + 8], 0
mov dword [esi + 0x68], 0xe
call fcn.00412c28
mov eax, dword [esi + 0x60]
mov dword fs:[0], eax
mov eax, dword [esi + 8]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea edx, [esi + 0x3c]
lea eax, [esi + 4]
mov dword [esi + 0x10], 0
mov dword [esi + 0x3c], 0x42b27c
mov dword [esi + 0x40], 1
mov dword [esi + 0x4c], 0
mov dword [esi + 0xc], ebx
mov byte [esi + 0x14], 0
mov dword [esi + 0x68], 2
lea ecx, [esi + 0x34]
mov dword [esi + 0x44], eax
mov dword [esi + 0x48], 0
lea eax, [esi + 0x10]
push edx
push eax
push ecx
call fcn.004116f4
add esp, 0xc
mov ecx, dword [esi + 0x34]
mov edx, dword [esi + 0x38]
call fcn.004116e5
mov ecx, 7
int 0x29
ud2
Function at 0x40b8fc
Capabilities:
Generate random numbers via rtlgenrandom
Generate random numbers via winapi

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov dword [esp], ecx
push 0x20
pop ebp
xor eax, eax
mov edi, dword [esp]
test al, 1
jne 0x40b94a
lea eax, [edi + ebp]
mov esi, ebp
mov dword [esp], eax
push 2
push ebp
push edi
push 0
call dword [sym.imp.bcrypt.dll_BCryptGenRandom]
mov ebx, eax
xor ebp, ebp
mov al, 1
cmp ebx, 0xbfffffff
jbe 0x40b909
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_SystemFunction036]
test al, al
mov al, 1
jne 0x40b909
and ebx, 0x7fffffff
mov eax, ebx
jmp 0x40b94c
xor eax, eax
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x4113e2
Capabilities:
Write file on windows

Disassembly:
push ebx
push edi
push esi
sub esp, 0x34
mov edi, edx
lea edx, [esp + 4]
mov eax, dword [esp + 0x44]
mov esi, ecx
mov ecx, dword [esp + 0x48]
mov ebx, 0x103
and dword [edx + 4], 0
mov dword [edx], ebx
push 0
push 0
push ecx
push eax
push edx
push 0
push 0
push 0
push edi
call dword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, ebx
jne 0x41142f
push 0xffffffffffffffff
push edi
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [esp + 4]
cmp eax, 0x103
je 0x411453
test eax, eax
js 0x41143f
mov eax, dword [esp + 8]
mov dword [esi + 4], eax
mov byte [esi], 4
jmp 0x41144c
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
and dword [esi], 0
mov dword [esi + 4], eax
add esp, 0x34
pop esi
pop edi
pop ebx
ret
lea eax, [esp + 0xc]
lea ecx, [esp + 0x1c]
mov edx, esp
lea esi, [esp + 0x14]
and dword [eax], 0
mov dword [ecx], 0x42c678
mov dword [ecx + 4], 1
and dword [ecx + 0x10], 0
mov dword [ecx + 8], edx
and dword [ecx + 0xc], 0
mov byte [eax + 4], 0
push ecx
push eax
push esi
call fcn.004116f4
add esp, 0xc
mov ecx, dword [esi]
mov edx, dword [esi + 4]
call fcn.004116e5
push 7
pop ecx
int 0x29
ud2

Function at 0x415bcd
Capabilities:
Terminate process

Disassembly:
call fcn.00412c28
call 0x415bd7
push 0
call dword [sym.imp.kernel32.dll_ExitProcess]
Function at 0x418df5
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
test eax, eax
je 0x418e34
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x418e34
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x418e34
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x418e34
cmp dword [ecx + 0x74], 0xe
jbe 0x418e34
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x41ffb6
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x420053
push ebx
push esi
call fcn.0041ff7f
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0041fec8
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x420000
push esi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x420052
push edi
push eax
call fcn.00420bb6
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x420020
call fcn.0041eaf1
pop ecx
push esi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x420051
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041fec8
add esp, 0x20
test eax, eax
jne 0x42003f
push edi
call fcn.0041eaf1
jmp 0x420047
push ebx
call fcn.0041eaf1
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x421339
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42f3d0
push 0x42f3c8
push str.FlsAlloc
push 0x1e
call fcn.004211fa
mov esi, eax
add esp, 0x10
test esi, esi
je 0x42136d
push dword [ebp + 8]
mov ecx, esi
call dword [0x4281d8]
call esi
jmp 0x421373
call dword [sym.imp.kernel32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4213b7
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42f3e0
push 0x42f3d8
push str.FlsGetValue
push 0x20
call fcn.004211fa
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4213ee
push dword [ebp + 8]
mov ecx, esi
call dword [0x4281d8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.kernel32.dll_TlsGetValue]