joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ef3d0
Capabilities:
Delete registry key

Disassembly:
push esi
mov esi, ecx
push edi
mov edi, dword [esi + 8]
test edi, edi
je 0x4ef435
cmp dword [edi], 0
mov esi, dword [esi]
je 0x4ef415
push 0x55b660
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4ef42b
push str.RegDeleteKeyTransactedW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4ef42b
push 0
push dword [edi]
push 0
push 0
push dword [esp + 0x1c]
push esi
call eax
pop edi
pop esi
ret 4
cmp dword [edi + 4], 0
je 0x4ef42b
push dword [esp + 0xc]
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
pop edi
pop esi
ret 4
pop edi
mov eax, 1
pop esi
ret 4
cmp byte [0x5876e4], 0
jne 0x4ef475
push 0x55b660
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4ef467
push str.RegDeleteKeyExW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x5876e0], eax
mov byte [0x5876e4], 1
jmp 0x4ef47a
mov eax, dword [0x5876e0]
mov byte [0x5876e4], 1
jmp 0x4ef47a
mov eax, dword [0x5876e0]
test eax, eax
je 0x4ef490
push 0
push dword [esi + 4]
push dword [esp + 0x14]
push dword [esi]
call eax
pop edi
pop esi
ret 4
push dword [esp + 0xc]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
pop edi
pop esi
ret 4
Function at 0x4f0710
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5438a3
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x585184]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x254], esi
push eax
mov dword [ebp - 0x250], 0
call fcn.00501ba0
mov dword [ebp - 4], 1
push str.config.ini
push eax
lea eax, [ebp - 0x24c]
push eax
call fcn.00407660
add esp, 0x10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x234]
call fcn.00404370
lea eax, [ebp - 0x24c]
push eax
call fcn.00407cb0
add esp, 4
test al, al
jne 0x4f07bb
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov dword [ebp - 0x250], 1
jmp 0x4f08f1
push 0x20a
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.00504c10
add esp, 0xc
lea eax, [ebp - 0x24c]
cmp dword [ebp - 0x238], 8
cmovae eax, dword [ebp - 0x24c]
push eax
push 0x104
lea eax, [ebp - 0x21c]
push eax
push 0x55a4d4
push str.FailedIncrementVersion
push str.Upgrade
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor eax, eax
cmp word [ebp - 0x21c], ax
jne 0x4f0831
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], 7
mov word [esi], ax
mov dword [ebp - 0x250], 1
mov byte [ebp - 4], al
jmp 0x4f08f5
lea ecx, [ebp - 0x21c]
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x220], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x220], 7
mov word [ebp - 0x234], ax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4f0870
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x234]
call fcn.00404420
mov byte [ebp - 4], 4
xor eax, eax
movups xmm0, xmmword [ebp - 0x234]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
mov word [ebp - 0x234], ax
movq xmm0, qword [ebp - 0x224]
movq qword [esi + 0x10], xmm0
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x250], 1
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x234]
call fcn.00404370
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x24c]
call fcn.00404370
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00502346
mov esp, ebp
pop ebp
ret 4
Function at 0x4f2060
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
lea ebp, [esp - 0x408]
sub esp, 0x408
push 0xffffffffffffffff
push 0x543bf0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x585184]
xor eax, ebp
mov dword [ebp + 0x404], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 0x410]
mov eax, dword [ebp + 0x414]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x418]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], 0
mov dword [ebp], 0
mov byte [ebp - 4], 1
push 0x60
push 0
push esi
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
call ebx
mov edi, eax
mov dword [ebp - 0x1c], edi
test edi, edi
jne 0x4f2108
push 2
push eax
push esi
call ebx
mov edi, eax
mov dword [ebp - 0x1c], eax
test edi, edi
jne 0x4f2108
call fcn.004eed30
mov esi, eax
jmp 0x4f21d7
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
jne 0x4f2125
call fcn.004eed30
jmp 0x4f21ca
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
jne 0x4f2140
call fcn.004eed30
jmp 0x4f21ca
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov dword [ebp - 0x14], esi
lea eax, [esi + 1]
cmp eax, esi
jae 0x4f215b
mov esi, 0x8007000e
jmp 0x4f21cc
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp]
call fcn.004eeb60
mov dword [ebp - 4], 1
jmp 0x4f2187
mov eax, dword [ebp]
test eax, eax
jne 0x4f2195
mov esi, 0x8007000e
jmp 0x4f21cc
push esi
push eax
push esi
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
test ecx, ecx
jne 0x4f21b0
call fcn.004eed30
jmp 0x4f21ca
xor edx, edx
mov eax, dword [ebp]
mov word [eax + ecx*2], dx
push dword [ebp + 0x41c]
push dword [ebp]
lea ecx, [ebp - 0x24]
call fcn.004f1ed0
mov esi, eax
test edi, edi
je 0x4f21d7
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov byte [ebp - 4], 0
lea eax, [ebp + 4]
cmp dword [ebp], eax
je 0x4f21eb
lea ecx, [ebp]
call fcn.004f0700
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x404]
xor ecx, ebp
call fcn.00502346
lea esp, [ebp + 0x408]
pop ebp
ret 0x10
Function at 0x4fa750
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x545243
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x585184]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
movzx eax, word [ebp + 0xc]
mov esi, dword [ebp + 8]
push 0x5491e8
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x4fa8bb
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test ebx, ebx
je 0x4fa8bb
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4fa8bb
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4fa8bb
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x4fa8bb
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x4fa8b4
push ebx
push esi
push eax
call fcn.00504110
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0
push eax
push 0
push edi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x4fa8b4
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x4fa8b4
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov esi, eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x4fa86b
mov dword [esi], vtable.Gdiplus::Image.0
mov byte [ebp - 4], 1
lea eax, [ebp - 0x10]
push eax
push ebx
mov dword [esi], vtable.Gdiplus::Bitmap.0
mov dword [ebp - 0x10], 0
call sub.gdiplus.dll_GdipCreateBitmapFromStream
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x10]
mov dword [esi + 4], eax
mov byte [ebp - 4], 0
jmp 0x4fa86d
xor esi, esi
mov dword [ebp - 4], 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
test esi, esi
je 0x4fa8a0
mov eax, dword [esi + 8]
mov dword [esi + 8], 0
test eax, eax
je 0x4fa8a0
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
xor esi, esi
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4fd590
Capabilities:
Create process on windows

Disassembly:
push ebp
lea ebp, [esp - 0x94]
sub esp, 0x94
push 0xffffffffffffffff
push 0x545a28
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x585184]
xor eax, ebp
mov dword [ebp + 0x90], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 0xb
xor eax, eax
mov dword [ebp + 0x88], 0
mov dword [ebp + 0x8c], 0
lea ecx, [ebp + 0x78]
push str.restart.hzt
mov dword [ebp + 0x88], 0
mov dword [ebp + 0x8c], 7
mov word [ebp + 0x78], ax
call fcn.00404420
mov dword [ebp - 4], 0
lea eax, [ebp + 0x78]
push eax
lea eax, [edi + 4]
push eax
lea eax, [ebp + 0x18]
push eax
call fcn.00407100
add esp, 0xc
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x78]
call fcn.00404370
lea eax, [ebp + 0x18]
push eax
call fcn.00407b80
add esp, 4
test al, al
je 0x4fd792
lea eax, [ebp + 0x18]
mov ecx, edi
push eax
lea eax, [ebp]
push eax
call fcn.004fcdc0
mov byte [ebp - 4], 3
lea eax, [ebp + 0x18]
push eax
call fcn.00407fc0
add esp, 4
cmp dword [ebp + 0x10], 0
je 0x4fd786
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp]
push 0x3b
push eax
call fcn.00416800
mov esi, dword [ebp - 0x18]
add esp, 0xc
cmp esi, dword [ebp - 0x14]
je 0x4fd77a
push str.EXIT
push esi
call fcn.004219f0
add esp, 8
test al, al
jne 0x4fd77a
push 0x549f24
push esi
call fcn.004219f0
add esp, 8
test al, al
je 0x4fd77a
push esi
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x18]
call fcn.004dcef0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
sub eax, ecx
sub eax, 0x48
cmp eax, 0x18
jae 0x4fd77a
push ecx
lea ecx, [ebp + 0x30]
call fcn.00405950
mov byte [ebp - 4], 5
lea ecx, [ebp + 0x48]
mov eax, dword [ebp - 0x18]
add eax, 0x18
push eax
call fcn.00405950
mov byte [ebp - 4], 6
lea ecx, [ebp + 0x60]
mov eax, dword [ebp - 0x18]
add eax, 0x30
push eax
call fcn.00405950
mov byte [ebp - 4], 7
lea edx, [ebp + 0x48]
cmp dword [ebp + 0x5c], 8
lea ecx, [ebp + 0x60]
push 1
cmovae edx, dword [ebp + 0x48]
lea eax, [ebp + 0x30]
cmp dword [ebp + 0x74], 8
push edx
cmovae ecx, dword [ebp + 0x60]
cmp dword [ebp + 0x44], 8
push ecx
cmovae eax, dword [ebp + 0x30]
push eax
push str.open
push dword [edi + 0x1c]
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov byte [ebp - 4], 6
lea ecx, [ebp + 0x60]
call fcn.00404370
mov byte [ebp - 4], 5
lea ecx, [ebp + 0x48]
call fcn.00404370
mov byte [ebp - 4], 4
lea ecx, [ebp + 0x30]
call fcn.00404370
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x18]
call fcn.0040c590
mov byte [ebp - 4], 2
lea ecx, [ebp]
call fcn.00404370
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x18]
call fcn.00404370
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp + 0x90]
xor ecx, ebp
call fcn.00502346
lea esp, [ebp + 0x94]
pop ebp
ret
Function at 0x4fd7d0
Capabilities:
Create process on windows

Disassembly:
push ebp
lea ebp, [esp - 0x4c]
sub esp, 0x4c
push 0xffffffffffffffff
push 0x545a70
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x585184]
xor eax, ebp
mov dword [ebp + 0x48], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [ebp + 0x54]
push esi
call fcn.00407b80
add esp, 4
test al, al
jne 0x4fd819
xor al, al
jmp 0x4fd9e0
call fcn.00501020
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x4fd828
mov ecx, dword [esi]
push ecx
mov ecx, eax
call fcn.00501010
test al, al
je 0x4fd812
push 0
lea ecx, [ebp - 0xf]
call fcn.004fec00
mov dword [ebp - 4], 0
lea eax, [ebp - 0xe]
push eax
lea eax, [ebp - 0xd]
mov byte [ebp - 0xd], 0
push eax
push esi
lea eax, [ebp]
mov byte [ebp - 0xe], 0
push eax
mov ecx, edi
call fcn.004fc780
mov byte [ebp - 4], 1
xor eax, eax
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 0
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 7
mov word [ebp + 0x18], ax
mov byte [ebp - 4], 2
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp]
push eax
call fcn.00409d30
xor eax, eax
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 0
add esp, 8
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 7
mov word [ebp + 0x30], ax
mov byte [ebp - 4], 3
cmp byte [ebp - 0xd], al
je 0x4fd8d5
push 3
push 0x549f44
lea ecx, [ebp + 0x30]
call fcn.00404420
cmp byte [ebp - 0xe], 0
je 0x4fd8ff
cmp dword [ebp + 0x40], 0
je 0x4fd8f0
push 1
push 0x55b65c
lea ecx, [ebp + 0x30]
call fcn.00407830
push 5
push str._NCRC
lea ecx, [ebp + 0x30]
call fcn.00407830
mov eax, dword [edi + 0x1c]
xorps xmm0, xmm0
mov dword [ebp - 0x40], 0
movlpd qword [ebp - 0x2c], xmm0
movlpd qword [ebp - 0x24], xmm0
movlpd qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x4c], 0x3c
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], 0x540
call fcn.00500eb0
test al, al
mov dword [ebp - 0x30], 1
mov ecx, str.runas
lea eax, [ebp]
cmove ecx, dword [ebp - 0x40]
cmp dword [ebp + 0x14], 8
mov dword [ebp - 0x40], ecx
cmovae eax, dword [ebp]
cmp dword [ebp + 0x2c], 8
mov dword [ebp - 0x3c], eax
lea eax, [ebp + 0x18]
cmovae eax, dword [ebp + 0x18]
cmp dword [ebp + 0x44], 8
mov dword [ebp - 0x34], eax
lea eax, [ebp + 0x30]
cmovae eax, dword [ebp + 0x30]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
jne 0x4fd989
xor bl, bl
jmp 0x4fd9ab
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4fd9a9
cmp byte [ebp + 0x58], 0
je 0x4fd9a2
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
mov byte [ebp - 4], 2
lea ecx, [ebp + 0x30]
call fcn.00404370
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x18]
call fcn.00404370
mov byte [ebp - 4], 0
lea ecx, [ebp]
call fcn.00404370
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xf]
call fcn.004fec20
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x48]
xor ecx, ebp
call fcn.00502346
lea esp, [ebp + 0x4c]
pop ebp
ret 8
Function at 0x500e30
Capabilities:
Check os version

Disassembly:
sub esp, 0x118
mov eax, dword [0x585184]
xor eax, esp
mov dword [esp + 0x114], eax
push 0x110
lea eax, [esp + 8]
mov dword [esp + 4], 0x114
push 0
push eax
call fcn.00504c10
add esp, 0xc
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x500e97
mov eax, dword [esp + 4]
cmp eax, 5
ja 0x500e80
jne 0x500e97
cmp dword [esp + 8], 0
jbe 0x500e97
mov al, 1
mov ecx, dword [esp + 0x114]
xor ecx, esp
call fcn.00502346
add esp, 0x118
ret
mov ecx, dword [esp + 0x114]
xor al, al
xor ecx, esp
call fcn.00502346
add esp, 0x118
ret

Function at 0x500eb0
Capabilities:
Check os version

Disassembly:
sub esp, 0x118
mov eax, dword [0x585184]
xor eax, esp
mov dword [esp + 0x114], eax
push 0x110
lea eax, [esp + 8]
mov dword [esp + 4], 0x114
push 0
push eax
call fcn.00504c10
add esp, 0xc
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x500f05
xor al, al
mov ecx, dword [esp + 0x114]
xor ecx, esp
call fcn.00502346
add esp, 0x118
ret
cmp dword [esp + 4], 6
mov ecx, dword [esp + 0x114]
setae al
xor ecx, esp
call fcn.00502346
add esp, 0x118
ret
Function at 0x501dc0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x585184]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x410
push 0
lea eax, [ebp - 0x414]
push eax
call fcn.00504c10
add esp, 0xc
mov dword [ebp - 0x418], 0
lea ecx, [ebp - 0x418]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x501e0e
xor al, al
jmp 0x501e67
lea eax, [ebp - 0x414]
push eax
mov ecx, dword [ebp - 0x418]
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
jne 0x501e40
cmp dword [ebp - 0x418], 0
je 0x501e3c
mov edx, dword [ebp - 0x418]
push edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor al, al
jmp 0x501e67
lea eax, [ebp - 0x414]
push eax
mov ecx, dword [ebp + 0xc]
call fcn.00405890
cmp dword [ebp - 0x418], 0
je 0x501e65
mov ecx, dword [ebp - 0x418]
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00502346
mov esp, ebp
pop ebp
ret

Function at 0x5020b0
Capabilities:
Get session user name

Disassembly:
sub esp, 0x214
mov eax, dword [0x585184]
xor eax, esp
mov dword [esp + 0x210], eax
push esi
mov esi, ecx
mov dword [esi], 0
cmp dword [0x585154], 0
jne 0x502132
push 0x20a
lea eax, [esp + 0xc]
push 0
push eax
call fcn.00504c10
add esp, 0xc
mov dword [esp + 4], 0x104
lea eax, [esp + 4]
push eax
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
xor eax, eax
lea ecx, [esp + 8]
mov word [esp + 0x20e], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x502113
sub ecx, edx
lea eax, [esp + 8]
sar ecx, 1
push ecx
push eax
mov ecx, 0x585144
call fcn.00404420
mov ecx, dword [esp + 0x214]
mov eax, esi
pop esi
xor ecx, esp
call fcn.00502346
add esp, 0x214
ret
Function at 0x5021e0
Capabilities:
Get session user name

Disassembly:
push ebp
lea ebp, [esp - 0x210]
sub esp, 0x210
push 0xffffffffffffffff
push 0x546748
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x585184]
xor eax, ebp
mov dword [ebp + 0x20c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [0x587ba4]
test eax, eax
jle 0x502231
inc eax
mov dword [0x587ba4], eax
mov al, 1
jmp 0x502323
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x10], 0
xor bh, bh
mov dword [ebp - 0x14], 0
call fcn.0041c2e0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
call fcn.0041d190
mov bl, al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.0041c360
test bl, bl
je 0x502313
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x502313
push str.ImpersonateLoggedOnUser
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [ebp - 0x10]
call eax
test eax, eax
je 0x50230c
inc dword [0x587ba4]
mov eax, dword [edi]
test eax, eax
je 0x5022b6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
mov bh, 1
mov dword [edi], eax
cmp dword [0x58516c], 0
mov dword [ebp - 0x10], 0
jne 0x50230c
push 0x20a
lea eax, [ebp]
push 0
push eax
call fcn.00504c10
add esp, 0xc
mov dword [ebp - 0x14], 0x104
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
xor eax, eax
mov ecx, 0x58515c
mov word [ebp + 0x206], ax
lea eax, [ebp]
push eax
call fcn.00405890
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x502321
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bh
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x20c]
xor ecx, ebp
call fcn.00502346
lea esp, [ebp + 0x210]
pop ebp
ret

Function at 0x510bc9
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00510889
Function at 0x401a80
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._vfprintf
call sym._abort
jmp dbg.mark_section_writable

Function at 0x401ae0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x406050]
test esi, esi
jle 0x401bcd
mov edi, dword [0x406054]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x401b14
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x401bc6
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x401b00
mov dword [esp], eax
mov ebx, eax
call dbg.__mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x401c0a
lea ebx, [esi + esi*2]
mov esi, dword [0x406054]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call dbg._GetPEImageBase
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x406054]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401bea
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x401bbf
sub eax, 0x40
and eax, 0xffffffbf
je 0x401bbf
mov eax, dword [esp + 0x20]
add ebx, dword [0x406054]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x401bd4
add dword [0x406050], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor esi, esi
jmp 0x401b1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
mov eax, dword [0x406054]
mov eax, dword [eax + ebx + 4]
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 dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
Function at 0x4020d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x406408
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x406400]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x402125
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x40211e
test esi, esi
je 0x40211e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402100
mov dword [esp], 0x406408
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x402340
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x402378
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp edx, ebx
ja 0x40236e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40237a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402360
xor eax, eax
pop ebx
pop esi
ret