joyce8/EMBER2024-capa huggingface dataset:
Function at 0x410900
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
add eax, eax
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
push esi
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
mov dword [edi], 0
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
or eax, eax
jne 0x410971
mov eax, dword [ebp + 0xc]
cmp eax, 1
je 0x41093f
cmp eax, 2
jne 0x41095b
mov ecx, dword [ebp + 0x10]
or esi, esi
je 0x41096b
or ecx, ecx
je 0x410966
test cl, 1
jne 0x41095b
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x41096b
pop edi
nop
push 0xd
nop
pop eax
pop esi
pop ebp
ret 0xc
sub eax, eax
mov word [esi], ax
shr ecx, 1
mov dword [edi], ecx
xor eax, eax
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x41190f
Capabilities:
Accept command line arguments
Parse pe header

Disassembly:
push 0x14
push 0x432718
call fcn.00419b40
call fcn.00416695
movzx esi, ax
push 2
call fcn.00419970
pop ecx
mov eax, 0x5a4d
cmp word [sym.imp.shlwapi.dll_AssocQueryStringW], ax
je 0x4117c6
sub ebx, ebx
jmp 0x4117f9
mov eax, dword [sym.imp.shlwapi.dll_SHAutoComplete]
cmp dword [eax + sym.imp.shlwapi.dll_AssocQueryStringW], 0x4550
jne 0x4117c2
mov ecx, 0x10b
cmp word [eax + sym.imp.shlwapi.dll_StrCmpNW], cx
jne 0x4117c2
sub ebx, ebx
cmp dword [eax + 0x400074], 0xe
jbe 0x4117f9
cmp dword [eax + 0x4000e8], ebx
setne bl
mov dword [ebp - 0x1c], ebx
call fcn.00419392
or eax, eax
jne 0x41180d
push 0x1c
call fcn.004118e8
pop ecx
call fcn.00418df5
or eax, eax
jne 0x41181e
push 0x10
call fcn.004118e8
pop ecx
call fcn.00419a57
and dword [ebp - 4], 0
call fcn.004193a7
test eax, eax
jns 0x411838
push 0x1b
call fcn.004118e8
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov dword [0x46db80], eax
call fcn.00419a97
mov dword [0x46badc], eax
call fcn.00419655
test eax, eax
jns 0x41185e
push 8
call fcn.00418ed0
pop ecx
call fcn.0041988e
or eax, eax
jns 0x41186f
push 9
call fcn.00418ed0
pop ecx
push 1
call fcn.00418f0a
pop ecx
or eax, eax
je 0x411882
push eax
call fcn.00418ed0
pop ecx
call fcn.00419af2
push esi
push eax
push 0
push sym.imp.shlwapi.dll_AssocQueryStringW
call main
push eax
pop esi
mov dword [ebp - 0x24], esi
test ebx, ebx
jne 0x4118a4
push esi
call fcn.00419166
call fcn.00418efb
jmp 0x4118d9
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
call fcn.00419b85
ret
call fcn.004199bd
jmp 0x411798
Function at 0x4191d7
Capabilities:
Write file on windows

Disassembly:
push ebp
push esp
pop ebp
sub esp, 0x1fc
mov eax, dword [0x43581c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
push esi
call fcn.004191b3
push eax
pop edi
pop ecx
or edi, edi
je 0x419379
push ebx
push 3
call fcn.0041997d
pop ecx
cmp eax, 1
je 0x419321
push 3
call fcn.0041997d
pop ecx
test eax, eax
jne 0x41922b
cmp dword [0x46bc90], 1
je 0x419321
cmp esi, 0xfc
je 0x419378
push str.Runtime_Error__n_nProgram:
push 0x314
push 0x46bc98
call fcn.0041ecbb
add esp, 0xc
xor ebx, ebx
test eax, eax
jne 0x419387
push 0x104
push 0x46bcca
push ebx
mov word [0x46bed2], ax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, 0x2fb
test eax, eax
jne 0x419293
push str._program_name_unknown_
push esi
push 0x46bcca
call fcn.0041ecbb
add esp, 0xc
test eax, eax
jne 0x419387
push 0x46bcca
call fcn.00416bd5
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4192d9
push 0x46bcca
call fcn.00416bd5
lea ecx, [eax*2 + 0x46bc54]
push ecx
pop eax
sub eax, 0x46bcca
push 3
sar eax, 1
push 0x42f9b8
sub esi, eax
push esi
push ecx
call fcn.00421efa
add esp, 0x14
or eax, eax
jne 0x419387
push 0x42f9c0
push 0x314
mov esi, 0x46bc98
push esi
call fcn.00421e8e
add esp, 0xc
test eax, eax
jne 0x419387
push edi
push 0x314
push esi
call fcn.00421e8e
add esp, 0xc
or eax, eax
jne 0x419387
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push esi
call fcn.00421fb8
add esp, 0xc
jmp 0x419378
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
pop esi
test esi, esi
je 0x419378
cmp esi, 0xffffffff
je 0x419378
sub ebx, ebx
push ebx
pop ecx
mov al, byte [edi + ecx*2]
mov byte [ebp + ecx - 0x1f8], al
cmp word [edi + ecx*2], bx
je 0x419351
inc ecx
cmp ecx, 0x1f4
jb 0x419338
push ebx
lea eax, [ebp - 0x1fc]
push eax
lea eax, [ebp - 0x1f8]
push eax
mov byte [ebp - 5], bl
call fcn.00414600
pop ecx
push eax
lea eax, [ebp - 0x1f8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0041191e
leave
ret
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0041a2a4
int3

Function at 0x419a97
Capabilities:
Query environment variable

Disassembly:
push ebp
push esp
pop ebp
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov edi, eax
test edi, edi
je 0x419aef
push ebx
sub ebx, ebx
push esi
mov esi, edi
cmp word [edi], bx
je 0x419ac3
add esi, 2
cmp word [esi], bx
jne 0x419ab3
add esi, 2
cmp word [esi], bx
jne 0x419ab3
sub esi, edi
add esi, 2
push esi
call fcn.004156e1
pop ecx
mov dword [ebp - 4], eax
or eax, eax
je 0x419ae4
push esi
push edi
push eax
call fcn.00413fb0
mov ebx, dword [ebp - 4]
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
pop esi
mov eax, ebx
pop ebx
pop edi
leave
ret
Function at 0x421d40
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
push esp
pop ebp
mov eax, dword [ebp + 8]
push ebx
mov ecx, dword [eax + 0x3c]
add ecx, eax
push esi
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
sub edx, edx
add eax, ecx
push edi
test ebx, ebx
je 0x421d7c
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x421d74
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x421d7e
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x421d64
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x421e50
Capabilities:
Parse pe header

Disassembly:
push ebp
push esp
pop ebp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x421e64
sub eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
sub eax, eax
cmp dword [ecx], 0x4550
jne 0x421e7f
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
Function at 0x421fb8
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43581c]
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
mov eax, dword [ebp + 0xc]
xor edi, edi
push edi
mov dword [ebp - 0x20], eax
call ebx
push eax
pop esi
mov dword [ebp - 0x18], esi
call fcn.004166e4
mov dword [ebp - 0x14], eax
cmp dword [0x46ca18], edi
jne 0x4220a9
push 0x800
push edi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push eax
pop esi
or esi, esi
jne 0x422036
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x422189
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
pop esi
or esi, esi
je 0x422189
push str.MessageBoxW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x422189
push eax
call ebx
push str.GetActiveWindow
push esi
mov dword [0x46ca18], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push esi
mov dword [0x46ca1c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push esi
mov dword [0x46ca20], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x46ca28], eax
test eax, eax
je 0x4220a6
push str.GetProcessWindowStation
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x46ca24], eax
mov esi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x4220ce
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4220c1
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], edi
je 0x4220e3
push 4
pop eax
jmp 0x42218b
cmp dword [ebp - 0x14], edi
je 0x4220e3
push dword [0x46ca18]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x4220c8
mov eax, dword [0x46ca24]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, esi
je 0x422141
cmp dword [0x46ca28], esi
je 0x422141
push eax
call ebx
push dword [0x46ca28]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
or ecx, ecx
je 0x422141
or eax, eax
je 0x422141
call ecx
test eax, eax
je 0x422136
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 0x422136
test byte [ebp - 8], 1
jne 0x422141
mov esi, dword [ebp + 0x10]
or esi, 0x200000
jmp 0x422171
mov eax, dword [0x46ca1c]
cmp eax, esi
je 0x42216e
push eax
call ebx
test eax, eax
je 0x42216e
call eax
push eax
pop edi
or edi, edi
je 0x42216e
mov eax, dword [0x46ca20]
cmp eax, esi
je 0x42216e
push eax
call ebx
or eax, eax
je 0x42216e
push edi
call eax
mov edi, eax
mov esi, dword [ebp + 0x10]
push dword [0x46ca18]
call ebx
or eax, eax
je 0x422189
push esi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push edi
call eax
jmp 0x42218b
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041191e
leave
ret
Function at 0x426d1e
Capabilities:
Get geographical location

Disassembly:
push ebp
push esp
pop ebp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x426d7b
cmp word [esi], 0
je 0x426d7b
push 0x4316e4
push esi
call fcn.00426052
pop ecx
pop ecx
test eax, eax
je 0x426d7b
push 0x4316ec
push esi
call fcn.00426052
pop ecx
pop ecx
or eax, eax
jne 0x426d72
push 2
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push 0x2000000b
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x426d96
mov eax, dword [ebp + 8]
pop esi
pop ebp
ret
push esi
call fcn.00411936
pop ecx
jmp 0x426d6f
push 2
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push 0x20001004
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
or eax, eax
jne 0x426d9a
xor eax, eax
jmp 0x426d6f
mov eax, dword [ebp + 8]
or eax, eax
jne 0x426d6f
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_GetACP]

Function at 0x426dcb
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.00418cbb
mov esi, dword [ebp + 8]
push 2
mov edi, eax
lea eax, [ebp - 4]
push eax
push esi
pop ecx
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
or eax, eax
jne 0x426e03
xor eax, eax
jmp 0x426e2f
cmp esi, dword [ebp - 4]
je 0x426e2c
cmp dword [ebp + 0xc], 0
je 0x426e2c
push dword [edi + 0x9c]
call fcn.004269d9
push dword [edi + 0x9c]
push eax
pop esi
call fcn.00416bd5
pop ecx
pop ecx
cmp esi, eax
je 0x426dff
sub eax, eax
inc eax
pop edi
pop esi
leave
ret
Function at 0x427a3e
Capabilities:
Clear file content

Disassembly:
push ebp
push esp
pop ebp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
push 1
push esi
push esi
push edi
push esi
pop ebx
mov dword [ebp - 8], esi
call fcn.0041f2cf
push edx
pop ecx
mov dword [ebp - 0x18], eax
and eax, ecx
add esp, 0x10
mov dword [ebp - 0x14], ecx
cmp eax, 0xffffffff
je 0x427ac6
push 2
push esi
push esi
push edi
call fcn.0041f2cf
push eax
pop ecx
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x427ac6
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
sub esi, ecx
sbb eax, edx
mov dword [ebp - 4], eax
js 0x427b5d
jg 0x427aa0
or esi, esi
je 0x427b5d
push 0x1000
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0xc], eax
or eax, eax
jne 0x427ad2
call fcn.00416b81
mov dword [eax], 0xc
call fcn.00416b81
mov eax, dword [eax]
pop edi
pop esi
pop ebx
leave
ret
push 0x8000
push edi
call fcn.00427c1c
pop ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
pop ecx
or eax, eax
jl 0x427afa
jg 0x427af3
cmp esi, 0x1000
jb 0x427afa
mov eax, 0x1000
jmp 0x427afc
push esi
pop eax
push eax
push dword [ebp - 0xc]
push edi
call fcn.0041c714
add esp, 0xc
cmp eax, 0xffffffff
je 0x427b23
cdq
sub esi, eax
mov eax, dword [ebp - 4]
sbb eax, edx
mov dword [ebp - 4], eax
js 0x427b3e
jg 0x427ae5
test esi, esi
je 0x427b3e
jmp 0x427ae5
call fcn.00416b4d
cmp dword [eax], 5
jne 0x427b38
call fcn.00416b81
mov dword [eax], 0xd
or ebx, 0xffffffff
or dword [ebp - 8], ebx
push dword [ebp - 0x10]
push edi
call fcn.00427c1c
pop ecx
pop ecx
push dword [ebp - 0xc]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x427bc3
test eax, eax
jg 0x427bcf
jl 0x427b67
or esi, esi
jae 0x427bcf
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.0041f2cf
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x427ac6
push edi
call fcn.00424a9e
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
neg eax
sbb eax, eax
neg eax
dec eax
cdq
push eax
pop ebx
push edx
pop eax
mov ecx, ebx
and ecx, eax
mov dword [ebp - 8], eax
cmp ecx, 0xffffffff
jne 0x427bcf
call fcn.00416b81
mov dword [eax], 0xd
call fcn.00416b4d
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
and ebx, dword [ebp - 8]
cmp ebx, 0xffffffff
je 0x427ac6
push 0
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push edi
call fcn.0041f2cf
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x427ac6
xor eax, eax
jmp 0x427acd
Function at 0x4010c0
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa
Manually build aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
mov eax, dword [0x42a520]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ecx, ecx
mov al, 1
push edi
lea ebx, [ebx]
movzx edx, al
mov byte [ebp + edx - 0x104], cl
mov dl, al
and dl, 0x80
mov byte [ebp + ecx - 0x204], al
inc ecx
neg dl
sbb dl, dl
mov bl, al
and dl, 0x1b
add bl, bl
xor dl, bl
xor al, dl
cmp ecx, 0x100
jl 0x4010e0
mov al, 1
mov ecx, 0x46dea0
movzx edx, al
shl edx, 0x18
mov dword [ecx], edx
mov dl, al
and dl, 0x80
add ecx, 4
neg dl
sbb dl, dl
and dl, 0x1b
add al, al
xor al, dl
cmp ecx, 0x46dec8
jl 0x401115
mov dword [0x46d2a0], 0x63
mov dword [0x47046c], 0
mov edx, 1
jmp 0x401160
movzx eax, byte [ebp + edx - 0x104]
lea ecx, [ebp - 0x105]
sub ecx, eax
mov cl, byte [ecx]
mov al, cl
rol al, 1
xor cl, al
rol al, 1
xor cl, al
rol al, 1
xor cl, al
rol al, 1
xor al, cl
xor al, 0x63
movzx eax, al
mov dword [edx*4 + 0x46d2a0], eax
mov dword [eax*4 + 0x4702e0], edx
inc edx
cmp edx, 0x100
jl 0x401160
xor ecx, ecx
mov dl, byte [ecx + 0x46d2a0]
mov al, dl
and al, 0x80
neg al
sbb al, al
and al, 0x1b
mov bl, dl
add bl, bl
xor al, bl
movzx esi, al
movzx edx, dl
mov eax, esi
shl eax, 8
xor eax, edx
shl eax, 8
xor eax, edx
shl eax, 8
xor eax, esi
xor eax, edx
mov dword [ecx + 0x46fee0], eax
ror eax, 8
mov dword [ecx + 0x46fae0], eax
ror eax, 8
mov dword [ecx + 0x46f6e0], eax
ror eax, 8
mov dword [ecx + 0x46f2e0], eax
mov al, byte [ecx + 0x4702e0]
test al, al
je 0x40126f
movzx edx, al
movzx esi, byte [ebp + edx - 0x104]
movzx eax, byte [ebp - 0xf9]
add eax, esi
cdq
mov edi, 0xff
idiv edi
movzx eax, byte [ebp + edx - 0x204]
mov dword [ebp - 0x208], eax
movzx eax, byte [ebp - 0xf7]
add eax, esi
cdq
idiv edi
movzx eax, byte [ebp - 0xfb]
add eax, esi
movzx ebx, byte [ebp + edx - 0x204]
cdq
idiv edi
movzx eax, byte [ebp - 0xf6]
add eax, esi
mov esi, 0xff
movzx edi, byte [ebp + edx - 0x204]
cdq
idiv esi
movzx eax, byte [ebp + edx - 0x204]
mov edx, dword [ebp - 0x208]
jmp 0x401277
xor edx, edx
xor ebx, ebx
xor edi, edi
xor eax, eax
shl eax, 8
xor eax, edi
shl eax, 8
xor eax, ebx
shl eax, 8
xor eax, edx
mov dword [ecx + 0x46eee0], eax
ror eax, 8
mov dword [ecx + 0x46eae0], eax
ror eax, 8
mov dword [ecx + 0x46daa0], eax
ror eax, 8
mov dword [ecx + 0x46d6a0], eax
add ecx, 4
cmp ecx, 0x400
jl 0x4011a2
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041071c
mov esp, ebp
pop ebp
ret
Function at 0x405ee0
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x427788
push 0x4164e0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x42a520]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], ebx
mov word [ebp - 0x20], 0x500
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea ecx, [ebp - 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x405f7b
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x2c]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x405f61
mov dword [ebp - 0x28], ebx
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0x28]
jmp 0x405f7b
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0041071c
mov esp, ebp
pop ebp
ret

Function at 0x405fa0
Capabilities:
Get session user name
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4278c8
push 0x4164e0
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x42a520]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
xor eax, eax
xor esi, esi
mov dword [ebp - 4], eax
mov byte [ebp - 0x120], al
push 0x103
push eax
lea eax, [ebp - 0x11f]
push eax
call fcn.00412570
add esp, 0xc
mov dword [ebp - 0x12c], 0x104
lea ecx, [ebp - 0x12c]
push ecx
lea edx, [ebp - 0x120]
push edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x40607d
mov edx, 6
mov dword [ebp - 0x130], edx
lea ecx, [ebp - 0x120]
or eax, 0xffffffff
mov dword [ebp - 0x124], ecx
mov esi, edx
dec edx
mov dword [ebp - 0x130], edx
test esi, esi
je 0x40605c
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x426208]
inc ecx
jmp 0x406031
not eax
xor ecx, ecx
cmp eax, 0x39b5d60d
sete cl
mov esi, ecx
jmp 0x406077
mov dword [ebp - 0x128], esi
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0041071c
mov esp, ebp
pop ebp
ret
Function at 0x406e90
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor esi, esi
push esi
mov ecx, 0x46b1a0
call fcn.0040f67b
mov ebx, eax
mov dword [ebp - 4], 1
test ebx, ebx
je 0x406f44
test esi, esi
jne 0x406f44
mov eax, dword [ebp + 8]
shr eax, 4
inc eax
push esi
movzx ecx, ax
push ecx
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov edi, eax
test edi, edi
je 0x406f28
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x406f22
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x406f22
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
add eax, esi
and ecx, 0xf
jbe 0x406f11
cmp esi, eax
jae 0x406f15
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x406f03
cmp esi, eax
jb 0x406f19
xor eax, eax
jmp 0x406f22
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
mov esi, eax
test eax, eax
jne 0x406f4d
mov edi, dword [ebp - 4]
push edi
mov ecx, 0x46b1a0
call fcn.0040f67b
mov ebx, eax
inc edi
mov dword [ebp - 4], edi
test ebx, ebx
jne 0x406eb5
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x407050
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
mov eax, dword [ebp + 8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x407068
pop edi
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40709a
mov ecx, dword [ebp + 8]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, esi
and edi, 0xf
jbe 0x407096
cmp esi, eax
jae 0x40709a
dec edi
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x407088
cmp esi, eax
jb 0x4070a0
pop esi
xor eax, eax
pop edi
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebp
ret
Function at 0x409300
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421ec8
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x42a520]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x18]
push 0x46abf0
xor ebx, ebx
push eax
xor esi, esi
mov dword [ebp - 4], ebx
call fcn.004097a0
add esp, 8
mov edi, dword [ebp - 0x18]
cmp dword [edi - 0xc], ebx
je 0x409406
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
lea ebx, [ebp - 0x24]
mov byte [ebp - 4], 2
call fcn.004094e0
mov ebx, dword [ebp - 0x24]
test eax, eax
jne 0x4093f9
test ebx, ebx
je 0x409404
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0xc]
push ecx
push str.__s_
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00406df0
mov edi, dword [ebp - 0x14]
mov eax, edi
add esp, 8
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4093b0
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
mov eax, dword [ebp + 8]
push edx
push edi
push 2
push 0
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
neg eax
sbb esi, esi
lea eax, [edi - 0x10]
inc esi
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4093f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
je 0x409404
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40944c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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
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