joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47d840
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x50
push esi
mov esi, dword [esp + 0x58]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x47d85e
mov eax, 0x1000000
pop esi
add esp, 0x50
ret
lea eax, [esp + 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x47d878
mov eax, 0x200
pop esi
add esp, 0x50
ret
mov eax, dword [esp + 0x20]
push ebp
mov edx, eax
xor ebp, ebp
and edx, 1
push edi
je 0x47d88c
mov ebp, 1
test al, 2
je 0x47d893
or ebp, 2
test al, 4
je 0x47d89a
or ebp, 4
mov ecx, eax
and ecx, 0x10
je 0x47d8a4
or ebp, 0x10
test al, 0x20
je 0x47d8ab
or ebp, 0x20
test ecx, ecx
je 0x47d8b7
or ebp, 0x40000000
jmp 0x47d8bd
or ebp, 0x80000000
or ebp, 0x1000000
test edx, edx
jne 0x47d8cd
or ebp, 0x800000
push ebx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x28
mov dword [esp + 0x14], eax
jbe 0x47d97b
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x6c]
push 2
push edx
push esi
call ebx
push 0
push 0
push 0x24
push esi
call edi
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x24]
push 4
push ecx
push esi
call ebx
cmp word [esp + 0x64], 0x54ad
jne 0x47d97b
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
lea edx, [eax + 0x34]
cmp ecx, edx
jbe 0x47d97b
push 0
push 0
push eax
push esi
call edi
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x2c]
push 4
push ecx
push esi
call ebx
mov eax, dword [esp + 0x24]
cmp eax, 0x5a4d
je 0x47d975
cmp eax, 0x454e
je 0x47d975
cmp eax, 0x454c
je 0x47d975
cmp eax, 0x4550
jne 0x47d97b
or ebp, 0x400000
mov eax, dword [esp + 0x68]
pop ebx
test eax, eax
je 0x47d986
mov dword [eax], ebp
mov eax, dword [esp + 0x68]
test eax, eax
je 0x47d994
mov edx, dword [esp + 0x10]
mov dword [eax], edx
mov esi, dword [esp + 0x6c]
mov edi, dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test esi, esi
je 0x47d9fe
lea eax, [esp + 0x20]
lea ecx, [esp + 0x34]
push eax
push ecx
call edi
lea edx, [esp + 0x18]
lea eax, [esp + 0x3c]
push edx
push eax
call edi
lea ecx, [esp + 0x10]
lea edx, [esp + 0x2c]
push ecx
push edx
call edi
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push eax
push ecx
call fcn.0047d780
mov edx, dword [esp + 0x24]
mov dword [esi], eax
mov eax, dword [esp + 0x20]
push edx
push eax
call fcn.0047d780
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push ecx
push edx
mov dword [esi + 4], eax
call fcn.0047d780
add esp, 0x18
mov dword [esi + 8], eax
mov esi, dword [esp + 0x70]
test esi, esi
je 0x47da41
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x3c]
push eax
push ecx
call edi
lea edx, [esp + 0x64]
lea eax, [esp + 0x60]
push edx
lea ecx, [esp + 0x40]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x64]
and edx, 0xffff
and eax, 0xffff
shl edx, 0x10
or edx, eax
mov dword [esi], edx
pop edi
pop ebp
xor eax, eax
pop esi
add esp, 0x50
ret
Function at 0x47dc20
Capabilities:
Write file on windows

Disassembly:
mov edx, ecx
push ebx
push esi
push edi
mov ebx, dword [edx + 0x18]
test ebx, ebx
je 0x47dc70
mov edi, dword [edx + 0x1c]
mov eax, dword [esp + 0x14]
mov esi, dword [edx + 0x20]
lea ecx, [edi + eax]
cmp ecx, esi
jb 0x47dc4c
pop edi
pop esi
mov dword [edx + 0xc], 0x30000
xor eax, eax
pop ebx
ret 8
mov esi, dword [esp + 0x10]
mov ecx, eax
add edi, ebx
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [edx + 0x1c]
pop edi
add ecx, eax
pop esi
mov dword [edx + 0x1c], ecx
pop ebx
ret 8
mov eax, dword [edx]
test eax, eax
je 0x47dc98
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x14]
push 0
push edx
mov edx, dword [esp + 0x18]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
ret 8
pop edi
pop esi
mov dword [edx + 0xc], 0x1000000
xor eax, eax
pop ebx
ret 8

Function at 0x47e0c0
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, ecx
push ebp
push esi
mov edx, dword [ebx + 0x58]
test edx, edx
je 0x47e12a
mov eax, dword [ebx + 0x60]
mov ebp, dword [ebx + 0x5c]
cmp eax, ebp
jae 0x47e17b
mov ecx, dword [esp + 0x14]
sub ebp, eax
cmp ebp, ecx
jbe 0x47e0e6
mov ebp, ecx
mov ecx, ebp
lea esi, [eax + edx]
mov eax, dword [esp + 0x10]
mov edx, ecx
push edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx + 0x60]
mov ecx, dword [ebx + 0x48]
mov eax, dword [ebx + 0x4c]
add edx, ebp
add ecx, ebp
push eax
mov dword [ebx + 0x60], edx
mov dword [ebx + 0x48], ecx
call fcn.0047d550
add esp, 0xc
mov dword [ebx + 0x4c], eax
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret 8
mov eax, dword [ebx + 0x50]
test eax, eax
je 0x47e174
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push ecx
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x47e17b
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 0x48]
add ecx, eax
push eax
mov eax, dword [ebx + 0x4c]
push esi
push eax
mov dword [ebx + 0x48], ecx
call fcn.0047d550
add esp, 0xc
mov dword [ebx + 0x4c], eax
mov eax, dword [esp + 0x14]
pop esi
pop ebp
pop ebx
ret 8
mov dword [ebx + 0xc], 0x1000000
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
Function at 0x47f3a0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x14], 0xca
jne 0x47f3d3
push esi
call fcn.00484250
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x47f3cc
mov dword [esi + 0x14], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x14], 0xcb
mov eax, dword [esi + 0x14]
cmp eax, 0xcb
jne 0x47f459
mov eax, dword [esi + 0x1b8]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x47f442
mov eax, dword [esi + 8]
test eax, eax
je 0x47f3f7
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b8]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x47f43e
cmp eax, 2
je 0x47f442
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x47f3ea
cmp eax, 3
je 0x47f41d
cmp eax, 1
jne 0x47f3ea
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x47f3ea
mov edx, dword [esi + 0x144]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x47f3ea
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.0047f490
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x47f479
mov ecx, dword [esi]
push esi
mov dword [ecx + 0x14], 0x15
mov edx, dword [esi]
mov eax, dword [esi + 0x14]
mov dword [edx + 0x18], eax
mov ecx, dword [esi]
call dword [ecx]
add esp, 4
push esi
call fcn.0047f490
add esp, 4
pop esi
ret

Function at 0x4afeb0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x4afebb
xor eax, eax
ret
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x14]
cmp esi, 8
not eax
jb 0x4affbe
push edi
mov edi, esi
shr edi, 3
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [edx*4 + 0x5b1d18]
sub esi, 8
xor eax, ebx
inc ecx
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x5b1d18]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x5b1d18]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x5b1d18]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x5b1d18]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x5b1d18]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x5b1d18]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x5b1d18]
xor eax, edx
inc ecx
dec edi
jne 0x4afed6
pop edi
test esi, esi
je 0x4affe0
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x5b1d18]
xor eax, edx
inc ecx
dec esi
jne 0x4affc2
pop esi
pop ebx
not eax
ret
Function at 0x4d1af2
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4d1b12
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004d3949
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x4d1b35
test byte [esp + 8], 2
je 0x4d1b35
call fcn.004d39bc
mov dword [eax], 0xd
call fcn.004d39c5
mov dword [eax], 5
jmp 0x4d1b0e
xor eax, eax
ret

Function at 0x4e3422
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4e345a
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004e1499
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004e1471
jmp 0x4e3466
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4e4b14
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4e4b56
call fcn.004eaa48
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4e4b56
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4e4b4d
xor eax, eax
jmp 0x4e4b5e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004e4b64
pop edi
pop esi
pop ebx
ret 4

Function at 0x4eaf78
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4eafa6
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4eafc4
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004eaede
jmp 0x4eafc4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4eafc4
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004eaede
test edi, edi
mov eax, edi
jne 0x4eafae
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x40242f
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 0x32
xor edi, edi
pop ebx
push edi
push edi
push edi
push edi
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.DLL_CreateEventW]
mov esi, eax
cmp esi, edi
je 0x4024ba
push edi
push edi
push esi
push 0x40454b
push edi
push edi
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [ebp - 8], eax
push 1
dec ebx
call fcn.00404f7a
pop ecx
test eax, eax
je 0x40247e
push 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp ebx, edi
jne 0x402463
jmp 0x402485
mov dword [ebp - 4], 1
push esi
call dword [sym.imp.KERNEL32.DLL_SetEvent]
mov ebx, dword [ebp - 8]
push 0xffffffffffffffff
push ebx
mov dword [ebp - 0xc], edi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x4024aa
lea eax, [ebp - 0xc]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetExitCodeThread]
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
call esi
cmp ebx, edi
je 0x4024ba
push ebx
call esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4024c2
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0x14
call fcn.00409041
pop ecx
xor ecx, ecx
cmp eax, ecx
je 0x402500
mov edx, dword [ebp + 0x14]
push ecx
mov dword [eax + 8], edx
mov edx, dword [ebp + 0xc]
push ecx
mov dword [eax], edx
mov edx, dword [ebp + 0x10]
push eax
push dword [ebp + 8]
mov dword [eax + 4], edx
mov edx, dword [ebp + 0x18]
mov dword [eax + 0xc], edx
mov edx, dword [ebp + 0x1c]
push ecx
push ecx
mov dword [eax + 0x10], edx
call dword [sym.imp.KERNEL32.DLL_CreateThread]
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x40271b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor edi, edi
mov esi, 0x20a
push esi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
call fcn.00409041
mov ebx, eax
push esi
mov dword [ebp - 0x14], ebx
call fcn.00409041
mov esi, eax
pop ecx
pop ecx
mov dword [ebp - 0x18], esi
cmp esi, edi
je 0x402836
cmp ebx, edi
je 0x402844
push ebx
call fcn.00405b20
pop ecx
test eax, eax
je 0x402836
push dword [ebp + 8]
push 0x40a208
push ebx
push 3
push 0x104
push esi
call fcn.004059f1
add esp, 0x18
test eax, eax
je 0x402836
push edi
push edi
push 3
push edi
push edi
push closesocket
push esi
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x402836
mov ebx, dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push 2
push edi
push edi
push eax
call ebx
mov esi, eax
push esi
call fcn.00409041
mov dword [ebp - 4], eax
lea eax, [esi + esi + 2]
push eax
call fcn.00409041
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 4], edi
je 0x40282d
cmp eax, edi
je 0x40282d
push edi
push edi
push edi
push dword [ebp - 0xc]
call ebx
test eax, eax
jne 0x40282d
push edi
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp - 4]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x40282d
cmp dword [ebp - 0x10], esi
jne 0x40282d
mov ebx, dword [ebp - 8]
push esi
push ebx
push esi
push dword [ebp - 4]
push edi
push 0xfde9
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
push dword [ebp + 0xc]
xor ecx, ecx
push ebx
mov word [ebx + eax*2], cx
call fcn.00402504
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 0x14], edi
je 0x402844
push dword [ebp - 0x14]
call fcn.004090a1
pop ecx
cmp dword [ebp - 0x18], edi
je 0x402852
push dword [ebp - 0x18]
call fcn.004090a1
pop ecx
cmp dword [ebp - 4], edi
je 0x402860
push dword [ebp - 4]
call fcn.004090a1
pop ecx
cmp dword [ebp - 8], edi
pop edi
pop esi
pop ebx
je 0x402871
push dword [ebp - 8]
call fcn.004090a1
pop ecx
mov eax, dword [ebp - 0x1c]
leave
ret
Function at 0x403848
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
push dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.004090c6
cmp dword [esi + 0x1c], 0xffffffff
mov edi, eax
pop ecx
mov dword [ebp - 8], edi
je 0x403887
push ebx
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.004090c6
pop ecx
push eax
push dword [ebp + 8]
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.DLL_WriteConsoleW]
mov dword [ebp - 4], eax
cmp dword [esi + 0x18], 0xffffffff
je 0x4038d3
lea eax, [edi + edi + 2]
push eax
call fcn.00409041
mov edi, eax
pop ecx
cmp edi, ebx
je 0x4038d3
push ebx
push ebx
push dword [ebp - 8]
push edi
push dword [ebp - 8]
push dword [ebp + 8]
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.DLL_WideCharToMultiByte]
push ebx
lea ecx, [ebp - 0xc]
push ecx
push eax
push edi
mov byte [eax + edi], bl
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
and dword [ebp - 4], eax
push edi
call fcn.004090a1
pop ecx
mov eax, dword [ebp - 4]
pop edi
pop ebx
leave
ret

Function at 0x403969
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor esi, esi
push esi
push esi
push 2
push esi
push esi
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4039b1
push esi
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x4039aa
xor eax, eax
cmp dword [ebp - 4], ebx
sete al
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
mov eax, esi
pop esi
leave
ret

Function at 0x403a18
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [esi]
push ebx
push edi
lea eax, [eax + eax + 2]
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0x20119
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
xor edi, edi
push dword [ebp + 8]
inc edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403a7f
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
je 0x403a86
cmp eax, 0xea
je 0x403a86
mov dword [ebp - 4], ebx
mov dword [esi], ebx
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 4]
pop edi
pop ebx
leave
ret
mov eax, dword [ebp - 8]
shr eax, 1
dec eax
mov dword [ebp - 4], edi
mov dword [esi], eax
jmp 0x403a76

Function at 0x403a93
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push esi
add eax, eax
push eax
push dword [ebp + 0xc]
push 1
push 0
push dword [ebp + 8]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [edi]
neg eax
sbb esi, esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esi + 1]
pop esi
pop ebp
ret
Function at 0x403b33
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, eax
lea eax, [esi + esi + 2]
push edi
push eax
call fcn.00409041
pop ecx
push 0
push 0x28
mov dword [ebp - 4], eax
call fcn.00406347
mov edi, eax
mov eax, dword [ebp - 4]
push edi
push 0x403abe
push esi
push dword [ebp + 8]
call fcn.00405ec2
push edi
mov ebx, eax
call fcn.004039da
add esp, 0x1c
mov edi, ebx
test ebx, ebx
je 0x403ba3
inc esi
push esi
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
mov edi, eax
cmp edi, esi
jbe 0x403b8f
xor edi, edi
test edi, edi
jne 0x403ba2
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.0040927d
pop ecx
pop ecx
jmp 0x403ba3
dec edi
push dword [ebp - 4]
call fcn.004090a1
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x403cbd
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
push esi
push esi
push esi
push 1
push 0x40a3c0
mov dword [ebp - 4], esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0xc], eax
cmp eax, esi
je 0x403d45
push ebx
push esi
push esi
push dword [ebp + 8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 8], eax
cmp eax, esi
je 0x403d3f
push edi
push esi
push esi
push esi
push esi
push dword [ebp + 0xc]
push str.POST
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
cmp edi, esi
je 0x403d39
push esi
push dword [ebp + 0x14]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x403d36
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 4], eax
push edi
call ebx
push dword [ebp - 8]
call ebx
pop edi
push dword [ebp - 0xc]
call ebx
pop ebx
mov eax, dword [ebp - 4]
pop esi
leave
ret

Function at 0x403e39
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
call dword [sym.imp.KERNEL32.DLL_GetVersion]
and dword [ebp - 4], esi
cmp al, 6
jae 0x403e52
inc esi
jmp 0x403e99
lea eax, [ebp - 4]
push eax
push 8
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x403e8a
push 4
pop eax
lea ecx, [ebp - 8]
push ecx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0x14
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x403e8a
mov esi, dword [ebp - 0xc]
cmp dword [ebp - 4], 0
je 0x403e99
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, esi
pop esi
leave
ret
Function at 0x403e9e
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push 0x38
lea eax, [ebp - 0x38]
push 0
push eax
call fcn.00408fa9
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
add esp, 0xc
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0x3c
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x38], 0x100
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
leave
ret

Function at 0x404428
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
push ebx
push esi
lea eax, [ebp - 0x1c]
xor ebx, ebx
push eax
push 8
mov dword [ebp - 0x18], ebx
xor esi, esi
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
mov word [ebp - 0xc], 0x500
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40452b
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push ebx
push 2
push dword [ebp - 0x1c]
call edi
push dword [ebp - 4]
call fcn.00409041
pop ecx
mov esi, eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push 2
push dword [ebp - 0x1c]
call edi
test eax, eax
je 0x40452a
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40452a
xor edi, edi
cmp dword [esi], ebx
jbe 0x40452a
lea eax, [esi + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
push dword [eax]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4044e6
add dword [ebp - 0x14], 8
inc edi
cmp edi, dword [esi]
jb 0x4044c9
jmp 0x40452a
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x438]
push eax
mov dword [ebp - 4], 0x104
push dword [esi + edi*8 + 4]
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
jne 0x404523
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x534
jne 0x40452a
mov dword [ebp - 0x18], 1
pop edi
cmp dword [ebp - 8], ebx
je 0x404539
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp esi, ebx
je 0x404544
push esi
call fcn.004090a1
pop ecx
mov eax, dword [ebp - 0x18]
pop esi
pop ebx
leave
ret