joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48db31
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c70f9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x34
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
movzx eax, byte [ebp + 0x20]
test eax, eax
je 0x48dc5c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x28], eax
lea eax, [ebp + 0x24]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x1c], 0x75f6
mov dword [ebp - 0x20], str.fopp_sruu_wahv_ckpdow_kkudeol_fbowegabv_nipr
cmp dword [ebp - 0x1c], 0x794e
jle 0x48dbed
call dword [sym.imp.USER32.dll_CreateMenu]
and dword [ebp - 0x14], 0
jmp 0x48dba1
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x1ef6
jge 0x48dbe1
and dword [ebp - 0x18], 0
jmp 0x48dbb7
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0x5048
jge 0x48dbdf
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x18]
cdq
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], edx
push dword [ebp - 0x40]
push dword [ebp - 0x44]
mov ecx, 0xab95b8
call fcn.00452129
jmp 0x48dbb0
jmp 0x48db9a
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x24], eax
and dword [ebp - 4], 0
cmp dword [ebp - 0x1c], 0x7299
jge 0x48dc0d
mov edx, dword [ebp - 0x20]
mov ecx, 0xab95b8
call fcn.00453acf
jmp 0x48dc29
or dword [ebp - 4], 0xffffffff
jmp 0x48dc33
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push 1
push 0x2dce
push dword [ebp - 0x2c]
push 0x67b
mov eax, dword [ebp - 0x30]
movzx eax, byte [eax]
push eax
push dword [ebp - 0x34]
call fcn.0048dc95
add esp, 0x20
jmp 0x48dc84
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x3c], eax
push 1
push 0x73af
push 0x6b4b
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
push 1
call fcn.0048363f
add esp, 0x18
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4ac1bf
Capabilities:
Log keystrokes

Disassembly:
mov eax, 0x4c71d5
call fcn.004c60c8
sub esp, 0x50
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x28], edi
push 2
lea ecx, [ebp - 0x50]
call fcn.0045223e
xor ebx, ebx
mov dword [ebp - 0x18], ebx
jmp 0x4ac1f8
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x50]
mov dword [eax + ecx*4], 5
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 2
jl 0x4ac1e8
mov dword [ebp - 0x24], 0x2835
cmp dword [ebp - 0x24], 0x291a
jle 0x4ac268
mov edi, ebx
mov dword [ebp - 0x18], ebx
mov esi, ebx
mov dword [ebp - 0x20], esi
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x18], 0x57ac
mov eax, esi
and eax, ebx
and eax, edi
cdq
push edx
push eax
mov ecx, 0xab95b8
call fcn.00452129
dec esi
dec dword [ebp - 0x18]
jne 0x4ac225
mov esi, dword [ebp - 0x20]
inc esi
mov dword [ebp - 0x20], esi
cmp esi, 0x130a
jl 0x4ac21b
inc ebx
mov dword [ebp - 0x18], ebx
cmp ebx, 0x1e2e
push 0
pop ebx
jl 0x4ac213
inc edi
cmp edi, 0xeb8
jl 0x4ac210
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x18], ebx
xor esi, esi
inc esi
jmp 0x4ac27e
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x1c], 0xffffffff
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], esi
jl 0x4ac270
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x24], 0x280e
jge 0x4ac29e
mov edx, str.scuxzv_lfnmx_xgytzk_owcpqjh_kyqvktj_sgbyvi_apqje_gzekfxs_ueisykv_lmcbrpqsw_efx_oiki_numjdvafi
mov ecx, 0xab95b8
call fcn.00453acf
or dword [ebp - 4], 0xffffffff
jmp 0x4ac2ca
mov dword [ebp - 0x1c], esi
cmp dword [ebp - 0x1c], ebx
jl 0x4ac2f4
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x50]
cmp dword [eax + ecx*4], ebx
jne 0x4ac2f4
mov byte [ebp - 0x11], bl
cmp byte [ebp - 0x11], 0
je 0x4ac2ef
push ebx
push ebx
push ebx
call dword [sym.imp.USER32.dll_AttachThreadInput]
dec dword [ebp - 0x1c]
jns 0x4ac2d2
lea ecx, [ebp - 0x50]
call fcn.00452310
cmp dword [edi], 0
je 0x4ac3b1
push dword [edi]
push ebx
push dword [edi + 4]
call fcn.0045c073
add esp, 0xc
mov dword [ebp - 0x3c], 0x99cf
mov dword [ebp - 0x38], 0x229edca8
mov dword [ebp - 0x34], 0xffffffff
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x30], 0x270f9e3
mov dword [ebp - 0x30], 0xa05d7627
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x30], 0x5fba2522
push 2
lea ecx, [ebp - 0x5c]
call fcn.0045223e
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x18], ebx
jmp 0x4ac363
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x44], 0xd96711db
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], esi
jl 0x4ac355
mov dword [ebp - 0x18], ebx
jmp 0x4ac37d
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x5c]
mov dword [eax + ecx*4], 0xfffffff9
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 2
jl 0x4ac36d
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x38]
push eax
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x40]
call fcn.004ac0b5
pop ecx
pop ecx
inc dword [ebp - 0x2c]
lea ecx, [ebp - 0x5c]
call fcn.00452310
push dword [edi + 4]
call fcn.004b0ccd
pop ecx
mov dword [edi + 4], ebx
mov dword [edi], ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c0dbe
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4ca7d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.004b47fb
mov dword [ebp - 0x14], eax
cmp dword [0xaba71c], esi
jne 0x4c0eb1
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x4c0e3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x4c0f91
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x4c0f91
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4c0f91
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0xaba71c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0xaba720], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0xaba724], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0xaba72c], eax
test eax, eax
je 0x4c0eae
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0xaba728], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x4c0ed6
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4c0ec9
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x4c0eeb
push 4
pop eax
jmp 0x4c0f93
cmp dword [ebp - 0x14], esi
je 0x4c0eeb
push dword [0xaba71c]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x4c0ed0
mov eax, dword [0xaba728]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x4c0f49
cmp dword [0xaba72c], edi
je 0x4c0f49
push eax
call ebx
push dword [0xaba72c]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x4c0f49
test eax, eax
je 0x4c0f49
call ecx
test eax, eax
je 0x4c0f3e
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x4c0f3e
test byte [ebp - 8], 1
jne 0x4c0f49
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x4c0f79
mov eax, dword [0xaba720]
cmp eax, edi
je 0x4c0f76
push eax
call ebx
test eax, eax
je 0x4c0f76
call eax
mov esi, eax
test esi, esi
je 0x4c0f76
mov eax, dword [0xaba724]
cmp eax, edi
je 0x4c0f76
push eax
call ebx
test eax, eax
je 0x4c0f76
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0xaba71c]
call ebx
test eax, eax
je 0x4c0f91
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x4c0f93
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b1c5b
mov esp, ebp
pop ebp
ret
Function at 0x298b058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.0298b1a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x298b07e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x298b06a
add dl, dl
jne 0x298b089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x298b0dc
xor eax, eax
add dl, dl
jne 0x298b096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x298b17d
add dl, dl
jne 0x298b0a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x298b0b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x298b0bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x298b0c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x298b0d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x298b075
mov eax, 1
add dl, dl
jne 0x298b0ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x298b0f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x298b0e1
sub eax, ebx
mov ebx, 1
jne 0x298b128
mov ecx, 1
add dl, dl
jne 0x298b10e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x298b119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x298b105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x298b075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x298b13f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x298b14a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x298b136
cmp eax, 0x7d00
jae 0x298b16d
cmp eax, 0x500
jb 0x298b168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x298b075
cmp eax, 0x7f
ja 0x298b170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x298b075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x298b19e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x298b075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x4016e7
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
push edx
mov ebx, eax
mov dword [esp + 8], str.hello
mov eax, dword [ebp + 8]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
sub esp, 0xc
test eax, eax
jne 0x401726
mov dword [esp], str.NO1_n
jmp 0x401742
mov dword [esp + 4], eax
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_LoadResource]
push edi
push edi
test eax, eax
jne 0x40174e
mov dword [esp], str.NO2_n
call fcn.00401540
xor eax, eax
jmp 0x4017d3
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
push edx
mov edi, eax
mov dword [esp], ebx
mov dword [esp + 4], esi
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov ebx, eax
push ecx
push ecx
test edi, edi
je 0x401773
test eax, eax
jne 0x40177c
mov dword [esp], str.NO3_n
jmp 0x401742
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [esp + 8], 0x4be092
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp + 4], eax
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_fopen_s]
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x4017ae
mov dword [esp], str.NO4_n
jmp 0x401742
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 1
mov dword [esp], edi
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov al, 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4017db
Capabilities:
Create shortcut via ishelllink

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edi, dword [ebp + 0x14]
mov dword [esp], eax
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [ebp - 0x20]
xor ecx, ecx
push edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4ca930
mov dword [esp + 8], 1
mov dword [esp + 4], ecx
mov dword [esp], 0x4c4f90
call dword [sym.imp.ole32.dll_CoCreateInstance]
sub esp, 0x14
xor ebx, ebx
test eax, eax
js 0x40195c
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [ecx]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x50]
push eax
push eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 0xc]
mov edx, dword [eax]
mov ecx, dword [ecx]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x2c]
push eax
push eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ecx]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x24]
push eax
lea ecx, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x4c9e70
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov ebx, eax
test eax, eax
js 0x40193a
xor esi, esi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov eax, dword [edi]
mov dword [esp], 0xfde9
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
mov dword [ebp - 0x2c], eax
call eax
sub esp, 0x18
mov ebx, eax
cmp eax, 0x3ffffffe
ja 0x401904
lea eax, [eax + eax]
mov dword [esp], eax
call fcn.004b29c0
mov dword [esp + 0x14], ebx
mov esi, eax
xor ebx, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [edi]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], 0xfde9
mov eax, dword [ebp - 0x2c]
call eax
jmp 0x401909
call fcn.004b3ae8
mov eax, dword [ebp - 0x1c]
sub esp, 0x18
xor ecx, ecx
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [edx + 0x18]
mov ebx, eax
mov eax, dword [ebp - 0x1c]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
push edx
mov dword [esp], esi
call fcn.004b2990
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
not ebx
push eax
shr ebx, 0x1f
jmp 0x40195c
call dword [sym.imp.ole32.dll_CoUninitialize]
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x401d2c
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0x40
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GlobalMemoryStatusEx]
mov edx, dword [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x40]
leave
shrd eax, edx, 0x14
cmp eax, 0x7ff
seta al
movzx eax, al
ret

Function at 0x401d5d
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetSystemInfo]
push eax
xor eax, eax
cmp dword [ebp - 0x18], 1
leave
seta al
ret
Function at 0x402037
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
lea edx, [ebp - 0x24]
mov dword [esp + 4], 0x28
mov dword [esp + 8], edx
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea eax, [ebp - 0x20]
sub esp, 0xc
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], str.SeDebugPrivilege
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
xor ecx, ecx
sub esp, 0xc
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x10], edx
xor edx, edx
mov dword [ebp - 0xc], 2
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edx
mov dword [esp + 4], ecx
mov dword [esp + 0xc], 0x10
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov eax, dword [ebp - 0x24]
sub esp, 0x18
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
leave
ret
Function at 0x40248a
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov eax, 0x13ec
mov ebp, esp
push edi
push esi
push ebx
call fcn.0040e100
sub esp, eax
lea eax, [ebp - 0x13c8]
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x13d0], eax
xor eax, eax
cmp byte [ebp + 0xc], 0
mov dword [ebp - 0x13cc], eax
mov byte [ebp - 0x13c8], 0
jne 0x4024cb
mov eax, esi
test al, al
je 0x4024f3
jmp 0x4024e0
mov dword [esp], 0x4be27b
lea ecx, [ebp - 0x13d0]
call fcn.0049e310
push eax
jmp 0x4024c3
mov dword [esp], 0x4be296
lea ecx, [ebp - 0x13d0]
call fcn.0049e310
push eax
test bl, bl
je 0x40250a
mov dword [esp], 0x4be2b1
lea ecx, [ebp - 0x13d0]
call fcn.0049e310
push eax
cmp dword [ebp - 0x13cc], 0
jne 0x402528
mov dword [esp], 0x4be1f4
mov ecx, dword [ebp + 8]
call fcn.0040166c
push edi
jmp 0x4026ad
lea eax, [ebp - 0x13b0]
mov byte [ebp - 0x13b0], 0
xor esi, esi
mov dword [ebp - 0x13b8], eax
mov dword [ebp - 0x13b4], esi
xor esi, esi
cmp esi, dword [ebp + 0x18]
jge 0x40265f
mov dword [esp], 0x4be2bc
lea edi, [ebp - 0x9dc]
mov ecx, edi
call fcn.0040166c
push ebx
lea ecx, [ebp - 0x13a0]
mov dword [esp], edi
call fcn.0048d3e0
push ecx
mov ecx, edi
call fcn.0049cec0
lea ecx, [ebp - 0x13a0]
call fcn.0048d670
mov dword [ebp - 0x9dc], eax
mov edx, 1
jmp 0x40259f
mov eax, dword [ebp + edx*4 - 0x9e0]
mov ecx, eax
shr ecx, 0x1e
xor eax, ecx
imul eax, eax, 0x6c078965
add eax, edx
mov dword [ebp + edx*4 - 0x9dc], eax
inc edx
cmp edx, 0x270
jne 0x40259f
mov ebx, dword [ebp - 0x13cc]
mov dword [ebp - 0x1c], 0x270
lea ecx, [ebp - 0x9dc]
test ebx, ebx
je 0x402630
call fcn.00498fc8
mul ebx
mov dword [ebp - 0x13e0], eax
mov ecx, dword [ebp - 0x13e0]
mov dword [ebp - 0x13dc], edx
cmp ecx, ebx
jae 0x402628
mov eax, ebx
xor edx, edx
neg eax
div ebx
mov edi, edx
cmp ecx, edi
jae 0x402628
lea ecx, [ebp - 0x9dc]
call fcn.00498fc8
mul ebx
mov dword [ebp - 0x13e0], eax
mov ecx, dword [ebp - 0x13e0]
mov dword [ebp - 0x13dc], edx
jmp 0x402603
mov eax, dword [ebp - 0x13dc]
jmp 0x402635
call fcn.00498fc8
mov edx, dword [ebp - 0x13d0]
lea ecx, [ebp - 0x13b8]
movsx eax, byte [edx + eax]
mov dword [esp], eax
call fcn.0049fe20
push edx
lea ecx, [ebp - 0x13a0]
inc esi
call fcn.0048d360
jmp 0x402545
lea ebx, [ebp - 0x13b8]
mov dword [esp], ebx
mov ecx, dword [ebp + 8]
call fcn.0049fea0
mov ecx, ebx
push eax
call fcn.0049cec0
jmp 0x4026ad
lea ecx, [ebp - 0x13d0]
call fcn.0049cec0
mov eax, dword [ebp + 8]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40d3e0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.0041c910
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.0041c910
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x40d440
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x516128]
test esi, esi
jle 0x40d560
mov eax, dword [0x51612c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x40d474
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40d4f7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x40d460
mov dword [esp], ebx
call fcn.0040de30
mov edi, eax
test eax, eax
je 0x40d587
mov eax, dword [0x51612c]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.0040df70
mov edx, dword [0x51612c]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x40d567
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x40d4f0
lea edx, [eax - 0x40]
and edx, 0xffffffbf
jne 0x40d500
add dword [0x516128], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x51612c]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x40d4f0
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.0040d3e0
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x40d47e
mov eax, dword [0x51612c]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.0040d3e0
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.0040d3e0
lea esi, [esi]
nop
Function at 0x40daa0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x516144
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov ebx, dword [0x51613c]
sub esp, 4
test ebx, ebx
je 0x40daf5
mov ebp, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.DLL_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
mov esi, eax
sub esp, 4
call edi
test esi, esi
je 0x40daee
test eax, eax
jne 0x40daee
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40dad0
mov dword [esp], 0x516144
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40de30
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x40de55
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x40de60
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x40de55
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x40dea8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40de9e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40deaa
add ecx, 1
add eax, 0x28
cmp esi, ecx
jne 0x40de90
xor eax, eax
pop ebx
pop esi
ret
Function at 0x413760
Capabilities:
Terminate process

Disassembly:
sub esp, 0x1c
mov dword [esp + 8], 0x2d
mov dword [esp + 4], str._buffer_overflow_detected_:_terminated_n
mov dword [esp], 2
call sub.msvcrt.dll__write
mov dword [esp], 0x17
call sub.KERNEL32.DLL_IsProcessorFeaturePresent
sub esp, 4
test eax, eax
je 0x413799
mov ecx, 8
int 0x29
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
mov dword [esp + 4], 0xc0000409
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
push eax
push eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x4137c0
Capabilities:
Terminate process

Disassembly:
sub esp, 0x1c
mov dword [esp + 8], 0x2c
mov dword [esp + 4], str._stack_smashing_detected_:_terminated_n
mov dword [esp], 2
call sub.msvcrt.dll__write
mov dword [esp], 0x17
call sub.KERNEL32.DLL_IsProcessorFeaturePresent
sub esp, 4
test eax, eax
je 0x4137f9
mov ecx, 2
int 0x29
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
mov dword [esp + 4], 0xc0000409
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
push eax
push eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop