joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d1672
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
cmp eax, 0x80
jne 0x4d168f
mov dword [edi], 0xa
jmp 0x4d16a9
cmp eax, 0xc0
jne 0x4d169e
mov dword [edi], 0xc
jmp 0x4d16a9
mov eax, 0x100
mov dword [edi], 0xe
cdq
and edx, 0x1f
add eax, edx
mov ecx, eax
sar ecx, 5
mov dword [ebp - 4], ecx
test ecx, ecx
jle 0x4d16f2
mov eax, dword [ebp + 0xc]
lea edx, [edi + 4]
add eax, 2
mov dword [ebp + 8], ecx
movzx esi, byte [eax - 2]
movzx ebx, byte [eax - 1]
shl esi, 8
or esi, ebx
movzx ebx, byte [eax]
shl esi, 8
or esi, ebx
movzx ebx, byte [eax + 1]
shl esi, 8
or esi, ebx
mov dword [edx], esi
add eax, 4
add edx, 4
dec dword [ebp + 8]
jne 0x4d16c7
mov eax, dword [edi]
lea eax, [eax*4 + 4]
cmp ecx, eax
mov dword [ebp - 8], eax
mov dword [ebp + 8], 1
mov ebx, ecx
jge 0x4d1800
lea eax, [edi + 4]
mov dword [ebp + 0x10], eax
mov ecx, 0xff
mov eax, ebx
cdq
idiv dword [ebp - 4]
mov esi, dword [edi + ebx*4]
test edx, edx
jne 0x4d1788
mov eax, esi
sar eax, 0x10
and eax, ecx
movzx eax, byte [eax + str.cw]
mov edx, esi
sar edx, 8
and edx, ecx
movzx edx, byte [edx + str.cw]
shl eax, 8
or eax, edx
mov edx, esi
and edx, ecx
movzx edx, byte [edx + str.cw]
shl eax, 8
or eax, edx
sar esi, 0x18
and esi, ecx
movzx edx, byte [esi + str.cw]
shl eax, 8
or eax, edx
mov edx, dword [ebp + 8]
shl dword [ebp + 8], 1
shl edx, 0x18
xor eax, edx
cmp dword [ebp + 8], 0x100
mov esi, eax
jl 0x4d17e5
xor dword [ebp + 8], 0x11b
jmp 0x4d17e5
cmp dword [ebp - 4], 8
jne 0x4d17e5
mov eax, ebx
and eax, reloc.OLEAUT32.dll_VariantInit
jns 0x4d179c
dec eax
or eax, 0xfffffff8
inc eax
cmp eax, 4
jne 0x4d17e5
mov eax, esi
sar eax, 0x18
and eax, ecx
movzx eax, byte [eax + str.cw]
mov edx, esi
sar edx, 0x10
and edx, ecx
movzx edx, byte [edx + str.cw]
shl eax, 8
or eax, edx
mov edx, esi
sar edx, 8
and edx, ecx
movzx edx, byte [edx + str.cw]
shl eax, 8
and esi, ecx
or eax, edx
movzx edx, byte [esi + str.cw]
shl eax, 8
or eax, edx
mov esi, eax
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
add dword [ebp + 0x10], 4
xor edx, esi
lea eax, [edi + 4]
mov dword [eax + ebx*4], edx
inc ebx
cmp ebx, dword [ebp - 8]
jl 0x4d171a
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4d4791
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
lea ebp, [esi + 0x18]
push 0x631718
mov ecx, ebp
mov dword [esi + 0x85c], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
call fcn.00498be1
lea edi, [esi + 0x450]
push SysReAllocStringLen
mov ecx, edi
call fcn.004aafcd
push str.SOFTWARERITThe_Bat_
mov ecx, edi
call fcn.004ab3d4
test eax, eax
je 0x4d4808
push ebx
push str.Working_Directory
mov ecx, edi
call fcn.004ab5bd
mov edi, eax
cmp edi, ebx
je 0x4d4808
push 0x3ff
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push edi
call fcn.00564e3f
pop ecx
jmp 0x4d4812
mov dword [esi + 0x85c], 1
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x4d6492
Capabilities:
Encode data using xor

Disassembly:
push 0xa8
mov eax, 0x5e8115
call fcn.0059ca8d
mov ebx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x20]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0xb4], eax
cmp ebx, 0x13880
jbe 0x4d64c3
or eax, 0xffffffff
jmp 0x4d6560
lea ecx, [ebp - 0xb0]
call fcn.004b0c41
and dword [ebp - 4], 0
push 0x10
lea eax, [ebp - 0x24]
push esi
push eax
call fcn.0059d730
mov al, byte [ebp + 0x1c]
add esp, 0xc
mov byte [ebp - 0x11], al
lea eax, [ebp - 0x38]
push eax
push 0x14
pop esi
push esi
lea eax, [ebp - 0x24]
push eax
push esi
push edi
lea ecx, [ebp - 0xb0]
mov byte [ebp - 0x12], 0
mov byte [ebp - 0x13], 0
mov byte [ebp - 0x14], 0
call fcn.004b11be
cmp ebx, 1
jbe 0x4d653c
dec ebx
lea eax, [ebp - 0x4c]
push eax
push esi
lea eax, [ebp - 0x38]
push eax
push esi
push edi
lea ecx, [ebp - 0xb0]
call fcn.004b11be
xor eax, eax
mov ecx, dword [ebp + eax - 0x4c]
xor dword [ebp + eax - 0x38], ecx
add eax, 4
cmp eax, esi
jb 0x4d652a
dec ebx
jne 0x4d6512
push esi
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0xb4]
call fcn.0059d730
or dword [ebp - 4], 0xffffffff
add esp, 0xc
lea ecx, [ebp - 0xb0]
call fcn.004b0c4a
xor eax, eax
call fcn.0059cb10
ret 0x1c
Function at 0x4d6568
Capabilities:
Encode data using xor

Disassembly:
push 0x138
mov eax, 0x5e8148
call fcn.0059ca8d
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x18]
mov esi, dword [ebp + 0x20]
mov dword [ebp - 0x140], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x144], eax
cmp edi, 0x13880
jbe 0x4d659f
or eax, 0xffffffff
jmp 0x4d6635
lea ecx, [ebp - 0x13c]
call fcn.004f3aba
push 0x10
push dword [ebp - 0x144]
lea eax, [ebp - 0x24]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.0059d730
mov al, byte [ebp + 0x1c]
add esp, 0xc
push esi
push 0x14
mov byte [ebp - 0x11], al
lea eax, [ebp - 0x24]
push eax
push 0x14
push dword [ebp - 0x140]
lea ecx, [ebp - 0x13c]
mov byte [ebp - 0x12], bl
mov byte [ebp - 0x13], bl
mov byte [ebp - 0x14], bl
call fcn.004f4ff3
cmp edi, 1
jbe 0x4d6624
lea ebx, [ebp - 0x64]
sub ebx, esi
dec edi
lea eax, [ebp - 0x64]
push eax
push 0x40
push esi
push 0x14
push dword [ebp - 0x140]
lea ecx, [ebp - 0x13c]
call fcn.004f4ff3
push 0x10
mov eax, esi
pop ecx
mov edx, dword [ebx + eax]
xor dword [eax], edx
add eax, 4
dec ecx
jne 0x4d6616
dec edi
jne 0x4d65f7
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x13c]
call fcn.004f3ac3
xor eax, eax
call fcn.0059cb10
ret 0x1c
Function at 0x4d74df
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e835b
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x8008
call fcn.0059cbb0
mov eax, dword [0x665ebc]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
xor esi, esi
push 0x7ffe
mov dword [ebp - 0x8018], eax
lea eax, [ebp - 0x8013]
push esi
push eax
mov dword [ebp - 4], esi
mov byte [ebp - 0x8014], 0
call fcn.0059cb30
add esp, 0xc
push 0xffffffffffffffff
push esi
mov ecx, ebx
call fcn.005757d6
push dword [ebp - 0x8018]
lea eax, [ebp - 0x8014]
push 0x7fff
push eax
push str.Personalities
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
mov dword [ebp - 0x8018], eax
lea eax, [esi + 1]
cmp eax, dword [ebp - 0x8018]
jae 0x4d75bf
lea edi, [ebp + esi - 0x8014]
cmp byte [edi], 0
je 0x4d75b2
cmp byte [ebp + esi - 0x8013], 0
je 0x4d75b2
push 0x3d
push edi
call fcn.0059cbf0
pop ecx
pop ecx
test eax, eax
je 0x4d75a6
mov ecx, dword [ebx + 8]
inc eax
push eax
push ecx
jmp 0x4d75ab
mov eax, dword [ebx + 8]
push edi
push eax
mov ecx, ebx
call fcn.00575c79
push edi
call fcn.0059bf90
pop ecx
lea esi, [esi + eax + 1]
jmp 0x4d756f
xor eax, eax
inc eax
jmp 0x4d75cc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0059ca15
leave
ret 8
Function at 0x4d75e8
Capabilities:
Read .ini file

Disassembly:
push ebp
sub esp, 0x204
lea ebp, [esp - 4]
mov eax, dword [0x665ebc]
xor eax, ebp
mov dword [ebp + 0x204], eax
push 0x18
mov eax, 0x5e838b
call fcn.0059ca57
mov edi, dword [ebp + 0x210]
mov ebx, dword [ebp + 0x214]
and dword [ebp - 4], 0
and dword [ebp - 0x14], 0
mov esi, ecx
lea ecx, [ebp]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], ebx
call fcn.004e8915
push edi
push 0x100
lea eax, [ebp + 0x104]
push eax
mov edi, 0x631718
push edi
push str.RealName
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov byte [ebp - 4], 1
mov byte [ebp + 0x104], 0
call ebx
mov eax, dword [esi + 0x34]
add esi, 0x2c
lea ecx, [ebp + 0x104]
push ecx
push eax
mov ecx, esi
call fcn.00575c79
push dword [ebp - 0x1c]
lea eax, [ebp + 0x104]
push 0x100
push eax
push edi
push str.ReturnAddress
push dword [ebp - 0x18]
mov byte [ebp + 0x104], 0
call ebx
mov eax, dword [esi + 8]
lea ecx, [ebp + 0x104]
push ecx
push eax
mov ecx, esi
call fcn.00575c79
push dword [ebp - 0x1c]
lea eax, [ebp + 0x104]
push 0x100
push eax
push edi
push str.PopServer
push dword [ebp - 0x18]
mov byte [ebp + 0x104], 0
call ebx
mov eax, dword [esi + 8]
lea ecx, [ebp + 0x104]
push ecx
push eax
mov ecx, esi
call fcn.00575c79
push dword [ebp - 0x1c]
lea eax, [ebp + 0x104]
push 0x100
push eax
push edi
push str.LoginName
push dword [ebp - 0x18]
mov byte [ebp + 0x104], 0
call ebx
mov eax, dword [esi + 8]
lea ecx, [ebp + 0x104]
push ecx
push eax
mov ecx, esi
call fcn.00575c79
push dword [ebp - 0x1c]
lea eax, [ebp + 0x104]
push 0x100
push eax
mov byte [ebp + 0x104], 0
push edi
push str.SavePasswordText
push dword [ebp - 0x18]
call ebx
cmp byte [ebp + 0x104], 0
je 0x4d7776
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0x104]
push eax
lea ecx, [ebp]
call fcn.004e8b55
mov eax, dword [esi + 8]
xor ebx, ebx
mov ecx, esi
cmp dword [ebp - 0x14], ebx
je 0x4d777b
push dword [ebp - 0x14]
push eax
call fcn.00575c79
cmp dword [ebp - 0x14], ebx
je 0x4d7782
push dword [ebp - 0x14]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x14], ebx
jmp 0x4d7782
mov eax, dword [esi + 8]
mov ecx, esi
push edi
push eax
call fcn.00575c79
lea ecx, [ebp]
mov byte [ebp - 4], 0
call fcn.004e8931
xor eax, eax
inc eax
jmp 0x4d77aa
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x204]
xor ecx, ebp
call fcn.0059ca15
add ebp, 0x208
leave
ret 8

Function at 0x4d9267
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [ecx + 4]
sub eax, 0
je 0x4d927a
dec eax
jne 0x4d9282
add ecx, 0x6c
jmp fcn.00487039
add ecx, 8
jmp fcn.004b0fa6
ret
Function at 0x4d92fb
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x665ebc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push esi
mov esi, ecx
cmp eax, 0x40
jbe 0x4d9330
lea ecx, [ebp - 0x44]
push ecx
push eax
push edx
mov ecx, esi
call fcn.004d92d5
mov ecx, esi
lea edx, [ebp - 0x44]
call fcn.004d92bf
push edi
lea ecx, [esi + 0x238]
push 0x10
mov esi, ecx
pop edi
mov dword [esi - 0x40], 0x36363636
mov dword [esi], 0x5c5c5c5c
add esi, 4
dec edi
jne 0x4d933c
pop edi
test eax, eax
jbe 0x4d9364
mov esi, eax
mov al, byte [edx]
xor byte [ecx - 0x40], al
mov al, byte [edx]
xor byte [ecx], al
inc edx
inc ecx
dec esi
jne 0x4d9356
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0059ca15
leave
ret 8
Function at 0x4db72d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 8]
xor eax, eax
mov byte [ebp - 4], 0xb9
mov byte [ebp - 3], 2
mov byte [ebp - 2], 0xfa
mov byte [ebp - 1], 1
cmp dword [ebp + 0xc], eax
jbe 0x4db75d
mov edx, eax
and edx, 3
mov dl, byte [ebp + edx - 4]
xor byte [eax + ecx], dl
inc eax
cmp eax, dword [ebp + 0xc]
jb 0x4db74b
mov byte [eax + ecx], 0
xor eax, eax
inc eax
leave
ret 8
Function at 0x4e9045
Capabilities:
Encode data using xor
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
lea ebp, [esp - 0x5c]
sub esp, 0xb0
mov eax, dword [0x665ebc]
xor eax, ebp
mov dword [ebp + 0x58], eax
mov eax, dword [ebp + 0x6c]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x64]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x7c]
xor esi, esi
push 0x40
mov dword [ebp - 0x48], eax
lea eax, [ebp + 0x18]
push esi
push eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x40], esi
call fcn.0059cb30
push 0x54
lea eax, [ebp - 0x3c]
push esi
push eax
call fcn.0059cb30
mov ebx, dword [ebp + 0x68]
add esp, 0x18
cmp ebx, 0x40
jbe 0x4e909d
push 0x40
pop ebx
push ebx
lea eax, [ebp + 0x18]
push edi
push eax
call fcn.0059d730
push ebx
lea eax, [ebp - 0x3c]
push edi
push eax
call fcn.0059d730
add esp, 0x18
xor eax, eax
xor dword [ebp + eax + 0x18], 0x36363636
xor dword [ebp + eax - 0x3c], 0x5c5c5c5c
add eax, 4
cmp eax, 0x40
jb 0x4e90b8
mov dword [ebp - 0x4c], eax
cmp dword [ebp + 0x74], esi
jne 0x4e90df
xor eax, eax
jmp 0x4e9183
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
lea eax, [ebp - 0x40]
push eax
push esi
push esi
push dword [ebp + 0x78]
push dword [ebp + 0x74]
call ebx
test eax, eax
je 0x4e915f
mov edi, dword [sym.imp.ADVAPI32.dll_CryptHashData]
push esi
push 0x40
lea eax, [ebp + 0x18]
push eax
push dword [ebp - 0x40]
call edi
test eax, eax
je 0x4e915f
push esi
push dword [ebp + 0x70]
push dword [ebp - 0x54]
push dword [ebp - 0x40]
call edi
test eax, eax
je 0x4e915f
push esi
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp + 4]
push eax
push 2
push dword [ebp - 0x40]
mov dword [ebp - 0x4c], 0x14
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x4e915f
push dword [ebp - 0x48]
push esi
push esi
push dword [ebp + 0x78]
push dword [ebp + 0x74]
call ebx
test eax, eax
je 0x4e915f
push esi
push 0x54
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x48]
push dword [eax]
call edi
test eax, eax
jne 0x4e916b
mov eax, dword [ebp - 0x44]
mov dword [eax + 4], 0xb
jmp 0x4e9172
mov dword [ebp - 0x50], 1
cmp dword [ebp - 0x40], esi
je 0x4e9180
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp + 0x58]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0059ca15
add ebp, 0x5c
leave
ret 0x1c
Function at 0x4eec2e
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
push esi
mov esi, ecx
xor ebp, ebp
cmp dword [esi + 0x220], ebp
je 0x4eec8c
cmp dword [esi + 0x224], ebp
je 0x4eec8c
cmp dword [esi + 0x22c], ebp
je 0x4eec8c
cmp dword [esi + 0x238], ebp
je 0x4eec8c
cmp dword [esi + 0x234], ebp
je 0x4eec8c
cmp dword [esi + 0x228], ebp
je 0x4eec8c
cmp dword [esi + 0x230], ebp
je 0x4eec8c
cmp dword [esi + 0x23c], ebp
je 0x4eec8c
cmp dword [esi + 0x240], ebp
je 0x4eec8c
cmp dword [esi + 0x244], ebp
je 0x4eec8c
xor eax, eax
inc eax
jmp 0x4eed99
push ebx
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
cmp ebx, ebp
jne 0x4eecaa
mov dword [esi + 0x18], 1
jmp 0x4eed96
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.OpenServiceA
push ebx
call edi
push str.CreateServiceA
push ebx
mov dword [esi + 0x220], eax
call edi
push str.StartServiceA
push ebx
mov dword [esi + 0x224], eax
call edi
push str.DeleteService
push ebx
mov dword [esi + 0x22c], eax
call edi
push str.OpenSCManagerA
push ebx
mov dword [esi + 0x234], eax
call edi
push str.CloseServiceHandle
push ebx
mov dword [esi + 0x228], eax
call edi
push str.QueryServiceStatusEx
push ebx
mov dword [esi + 0x230], eax
call edi
push str.LockServiceDatabase
push ebx
mov dword [esi + 0x238], eax
call edi
push str.UnlockServiceDatabase
push ebx
mov dword [esi + 0x23c], eax
call edi
push str.ChangeServiceConfigA
push ebx
mov dword [esi + 0x240], eax
call edi
mov dword [esi + 0x244], eax
pop edi
cmp dword [esi + 0x220], ebp
je 0x4eed8f
cmp dword [esi + 0x224], ebp
je 0x4eed8f
cmp dword [esi + 0x22c], ebp
je 0x4eed8f
cmp dword [esi + 0x238], ebp
je 0x4eed8f
cmp dword [esi + 0x234], ebp
je 0x4eed8f
cmp dword [esi + 0x228], ebp
je 0x4eed8f
cmp dword [esi + 0x230], ebp
je 0x4eed8f
cmp dword [esi + 0x23c], ebp
je 0x4eed8f
cmp dword [esi + 0x240], ebp
je 0x4eed8f
cmp eax, ebp
je 0x4eed8f
xor eax, eax
inc eax
jmp 0x4eed98
mov dword [esi + 0x18], 2
xor eax, eax
pop ebx
pop esi
pop ebp
ret
Function at 0x4ef0c7
Capabilities:
Read .ini file

Disassembly:
push 0x43c
mov eax, 0x5e9ea7
call fcn.0059ca8d
mov eax, ecx
add eax, 0x1c
push eax
lea ecx, [ebp - 0x448]
call fcn.00428bc1
xor edi, edi
push edi
push edi
lea ecx, [ebp - 0x448]
mov dword [ebp - 4], edi
call fcn.00498d2a
mov esi, str.flag
push esi
push edi
lea ecx, [ebp - 0x448]
call fcn.00499340
lea eax, [ebp - 0x448]
push eax
push edi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x448]
mov esi, eax
call fcn.0042719c
mov eax, esi
call fcn.0059cb10
ret
Function at 0x4efb7c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
push esi
mov esi, ecx
xor ebp, ebp
cmp dword [esi + 0x1c], ebp
je 0x4efb8f
xor eax, eax
inc eax
jmp 0x4efc13
push ebx
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
cmp ebx, ebp
je 0x4efc10
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.NtQuerySystemInformation
push ebx
call edi
push str.RtlCompareUnicodeString
push ebx
mov dword [esi + 4], eax
call edi
push str.RtlCreateQueryDebugBuffer
push ebx
mov dword [esi + 8], eax
call edi
push str.RtlQueryProcessDebugInformation
push ebx
mov dword [esi + 0xc], eax
call edi
push str.RtlDestroyQueryDebugBuffer
push ebx
mov dword [esi + 0x10], eax
call edi
push str.RtlRunDecodeUnicodeString
push ebx
mov dword [esi + 0x14], eax
call edi
mov dword [esi + 0x18], eax
pop edi
cmp dword [esi + 4], ebp
je 0x4efc10
cmp dword [esi + 8], ebp
je 0x4efc10
cmp dword [esi + 0xc], ebp
je 0x4efc10
cmp dword [esi + 0x10], ebp
je 0x4efc10
cmp dword [esi + 0x14], ebp
je 0x4efc10
cmp eax, ebp
je 0x4efc10
xor eax, eax
inc eax
mov dword [esi + 0x1c], eax
jmp 0x4efc12
xor eax, eax
pop ebx
pop esi
pop ebp
ret
Function at 0x4efc16
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x19c]
sub esp, 0x21c
mov eax, dword [0x665ebc]
xor eax, ebp
mov dword [ebp + 0x198], eax
push ebx
push esi
push edi
mov eax, ecx
lea edi, [eax + 0x20]
xor eax, eax
mov word [edi], ax
lea eax, [ebp - 0x6c]
push eax
push 1
xor ebx, ebx
push 8
mov dword [ebp - 0x74], 0x164
mov dword [ebp - 0x7c], 0x200
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x70], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4efc9b
call esi
cmp eax, 0x3f0
jne 0x4efd39
lea eax, [ebp - 0x6c]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4efd39
lea eax, [ebp - 0x70]
push eax
push ebx
push ebx
push 1
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x4efd39
call esi
cmp eax, 0x7a
jne 0x4efd39
push dword [ebp - 0x70]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x78], eax
cmp eax, ebx
je 0x4efd39
lea ecx, [ebp - 0x70]
push ecx
push dword [ebp - 0x70]
push eax
push 1
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x4efd2c
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x74]
push eax
push edi
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x74], 0x100
push dword [eax]
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
je 0x4efd2c
push dword [ebp - 0x78]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4efd56
push dword [ebp - 0x78]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x6c], ebx
je 0x4efd47
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x74]
push edi
push str.USERDOMAIN
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, dword [ebp + 0x198]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0059ca15
add ebp, 0x19c
leave
ret
Function at 0x4efed4
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
push esi
xor esi, esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push dword [ebp + 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
push esi
push 0x410
mov byte [eax], 0
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp + 0x10], eax
cmp eax, esi
jne 0x4eff0f
xor eax, eax
pop esi
leave
ret 0x18
push ebx
mov ebx, dword [ebp + 0x18]
push edi
lea eax, [ebp - 0x50]
push eax
mov dword [ebx], esi
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push dword [ebp - 0x4c]
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 8
push dword [ebp - 4]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea ecx, [ebp - 8]
push ecx
push dword [ebp - 0x4c]
mov dword [ebp + 0x18], eax
push eax
push 0x7ffdf000
push dword [ebp + 0x10]
call edi
test eax, eax
jne 0x4eff60
xor esi, esi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop ebx
jmp 0x4eff0a
push 0x1c
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp + 0x18]
push dword [eax + 0x18]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x4f0049
test dword [ebp - 0x1c], 0x1000
je 0x4f0049
test dword [ebp - 0x18], 0x100
jne 0x4f0049
push dword [ebp - 0x20]
push 8
push dword [ebp - 4]
call esi
mov esi, eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x20]
mov eax, dword [ebp + 0x18]
push esi
push dword [eax + 0x18]
mov dword [ebp - 0xc], esi
push dword [ebp + 0x10]
call edi
test eax, eax
je 0x4f003b
push esi
push dword [ebp + 8]
call fcn.005a8679
pop ecx
pop ecx
test eax, eax
jne 0x4effe1
lea eax, [esi + 0x200]
push eax
push dword [ebp + 0xc]
call fcn.005a8679
pop ecx
pop ecx
test eax, eax
je 0x4efff1
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
inc esi
inc esi
add eax, ecx
cmp esi, eax
jb 0x4effbd
jmp 0x4f003b
test esi, esi
je 0x4f003b
lea eax, [esi + 0x42c]
movzx ecx, word [eax]
shr ecx, 1
and ecx, 0x7f
mov dword [ebx], ecx
mov al, byte [eax + 1]
mov ecx, dword [ebp + 0x1c]
mov byte [ecx], al
add esi, 0x434
cmp dword [ebx], 0x1fe
jbe 0x4f0021
mov dword [ebx], 0xff
mov eax, dword [ebx]
lea eax, [eax + eax + 2]
push eax
push esi
push dword [ebp + 0x14]
call fcn.0059d730
add esp, 0xc
mov dword [ebp - 0x10], 1
push dword [ebp - 0xc]
push 0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp + 0x18]
push 0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x10]
jmp 0x4eff51