joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ad530
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x120
mov eax, dword [0x54847c]
xor eax, esp
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x124]
push ebx
push ebp
mov ebp, dword [esp + 0x134]
xor ebx, ebx
push esi
push edi
mov edi, dword [esp + 0x138]
xor esi, esi
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], edi
call fcn.004f7802
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
jne 0x4ad5af
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00460670
push eax
push edi
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push ebp
call fcn.00476960
push esi
call dword [0x548004]
add esp, 0x20
lea eax, [ebx + 0x4d]
jmp 0x4ad70f
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x4ad609
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00460670
push eax
push edi
push str.schannel:_failed_to_open_CA_file__s:__s
push ebp
call fcn.00476960
push 0
mov esi, 0x4d
call dword [0x548004]
add esp, 0x20
jmp 0x4ad701
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4ad649
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00460670
push eax
push edi
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push ebp
call fcn.00476960
add esp, 0x1c
mov esi, 0x4d
jmp 0x4ad6ed
mov edi, dword [esp + 0x24]
cmp dword [esp + 0x28], ebx
jl 0x4ad677
jg 0x4ad65d
cmp edi, 0x100000
jbe 0x4ad677
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push ebp
call fcn.00476960
add esp, 0xc
mov esi, 0x4d
jmp 0x4ad6ed
lea eax, [edi + 1]
push eax
call dword [section..data]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4ad68f
lea esi, [eax + 0x1b]
jmp 0x4ad6ed
test edi, edi
je 0x4ad6d4
nop dword [eax]
nop word [eax + eax]
push 0
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + ebx]
push eax
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4ad72c
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4ad728
add esi, eax
cmp esi, edi
jb 0x4ad6a0
push ebp
push dword [esp + 0x18]
mov byte [edi + ebx], 0
push edi
push ebx
push dword [esp + 0x2c]
call fcn.004ad330
add esp, 0x14
mov esi, eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [0x548004]
add esp, 4
push dword [esp + 0x20]
call fcn.004e5a34
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x12c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004c7036
add esp, 0x120
ret
mov edi, esi
jmp 0x4ad6d4
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00460670
push eax
push dword [esp + 0x24]
push str.schannel:_failed_to_read_from_CA_file__s:__s
push ebp
call fcn.00476960
add esp, 0x1c
mov esi, 0x4d
jmp 0x4ad6ed
Function at 0x4b4220
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push edi
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [section..data]
mov edi, eax
add esp, 4
test edi, edi
jne 0x4b4247
pop edi
pop esi
pop ecx
ret
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
push ebx
mov ebx, dword [esp + 0x1c]
mov dword [edi + 8], eax
push ebp
cmp ebx, dword [esi + 0x10]
jbe 0x4b4292
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push dword [esp + 0x24]
push dword [edi + 4]
call eax
mov ebp, dword [edi + 8]
push dword [edi + 4]
add ebp, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ebp
call eax
mov ebx, dword [esi + 0x14]
add esp, 0x18
mov ecx, dword [edi + 4]
mov dword [esp + 0x20], ebx
jmp 0x4b4296
mov ebp, dword [esp + 0x1c]
mov eax, dword [esi]
push ecx
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [esp + 0x28]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x4b42f6
mov dword [esp + 0x10], eax
mov ebx, eax
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x18], al
lea eax, [esp + 0x18]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x24], al
lea eax, [esp + 0x24]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
sub ebx, 1
jne 0x4b42b5
mov ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0x10]
jae 0x4b4327
nop dword [eax + eax]
mov eax, dword [esi + 4]
push 1
push 0x51afa5
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x51afa6
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x4b4300
pop ebp
pop ebx
mov eax, edi
pop edi
pop esi
pop ecx
ret
Function at 0x4b4330
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
push dword [esp + 0x20]
call fcn.00479210
mov esi, dword [esp + 0x1c]
mov ebx, eax
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x14], ebx
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
lea ecx, [ecx + edx*2]
add ecx, 0xc
push ecx
call dword [section..data]
mov edi, eax
add esp, 8
test edi, edi
je 0x4b4498
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
mov dword [edi + 8], eax
cmp ebx, dword [esi + 0x10]
jbe 0x4b43ac
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push ebp
push dword [edi + 4]
call eax
mov ebp, dword [edi + 8]
push dword [edi + 4]
add ebp, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ebp
call eax
mov eax, dword [esi + 0x14]
add esp, 0x18
mov ecx, dword [edi + 4]
mov dword [esp + 0x10], eax
mov eax, dword [esi]
push ecx
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [esp + 0x18]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x4b4411
mov dword [esp + 0x18], eax
mov ebx, eax
nop dword [eax + eax]
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x1c], al
lea eax, [esp + 0x1c]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x28], al
lea eax, [esp + 0x28]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
sub ebx, 1
jne 0x4b43d0
mov ebx, dword [esp + 0x18]
cmp ebx, dword [esi + 0x10]
jae 0x4b443d
mov eax, dword [esi + 4]
push 1
push 0x51afa5
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x51afa6
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x4b4416
push dword [esp + 0x28]
call fcn.00479210
mov ecx, dword [edi]
push eax
push dword [esp + 0x2c]
push dword [edi + 4]
mov eax, dword [ecx + 4]
call eax
mov esi, dword [esp + 0x3c]
add esp, 0x10
mov ebx, dword [edi]
test esi, esi
jne 0x4b4468
mov esi, dword [ebx + 0xc]
add esi, dword [edi + 8]
push dword [edi + 4]
mov eax, dword [ebx + 8]
push esi
call eax
push dword [ebx + 0x14]
mov eax, dword [ebx + 4]
push esi
push dword [edi + 8]
call eax
push dword [edi + 8]
mov eax, dword [ebx + 8]
push esi
call eax
push edi
call dword [0x548004]
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
pop ecx
ret
Function at 0x4b4570
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0xc
lea eax, [esp + 4]
push 0xf0000040
push 0x18
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x4b4596
mov eax, 0x1b
add esp, 0xc
ret
lea eax, [esp + 8]
push eax
push 0
push 0
push 0x800c
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x4b45c6
push eax
push dword [esp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 2
add esp, 0xc
ret
push dword [esp + 0x18]
call fcn.00479210
add esp, 4
push 0
push eax
push dword [esp + 0x1c]
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
push 0
lea eax, [esp + 4]
mov dword [esp + 4], 0
push eax
push 0
push 2
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
cmp dword [esp], 0x20
jne 0x4b461d
push 0
lea eax, [esp + 4]
push eax
push dword [esp + 0x18]
push 2
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov eax, dword [esp + 8]
test eax, eax
je 0x4b462c
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [esp + 4]
test ecx, ecx
je 0x4b463d
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
add esp, 0xc
ret
Function at 0x4ca715
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebp
ret

Function at 0x4fb83a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004fb6b9

Function at 0x50002c
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x260
mov eax, dword [0x54847c]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x5c
pop esi
push 0x3a
mov dword [ebp - 0x258], edx
mov dword [ebp - 0x25c], 0x2f
pop edi
jmp 0x50006b
movzx eax, word [ecx]
cmp ax, word [ebp - 0x25c]
je 0x50006f
cmp ax, si
je 0x50006f
cmp ax, di
je 0x50006f
sub ecx, 2
cmp ecx, ebx
jne 0x500052
movzx esi, word [ecx]
cmp si, di
jne 0x500091
lea eax, [ebx + 2]
cmp ecx, eax
je 0x500091
push edx
xor edi, edi
push edi
push edi
push ebx
call fcn.004fff7b
add esp, 0x10
jmp 0x500118
push 0x2f
mov eax, esi
xor edi, edi
pop edx
cmp ax, dx
je 0x5000b1
push 0x5c
pop edx
cmp ax, dx
je 0x5000b1
push 0x3a
pop edx
cmp ax, dx
je 0x5000b1
mov eax, edi
jmp 0x5000b4
xor eax, eax
inc eax
sub ecx, ebx
movzx eax, al
sar ecx, 1
inc ecx
neg eax
push 0x250
sbb eax, eax
and eax, ecx
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x254]
push edi
push eax
call fcn.004df090
add esp, 0xc
lea eax, [ebp - 0x254]
push edi
push edi
push edi
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x500129
mov eax, dword [ebp - 0x258]
push eax
push edi
push edi
push ebx
call fcn.004fff7b
add esp, 0x10
mov edi, eax
cmp esi, 0xffffffff
je 0x500116
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004c7036
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x258]
push 0x2e
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
sar eax, 2
mov dword [ebp - 0x260], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x500164
cmp word [ebp - 0x226], di
je 0x50017f
cmp word [ebp - 0x226], ax
jne 0x500164
cmp word [ebp - 0x224], di
je 0x50017f
push ecx
push dword [ebp - 0x25c]
lea eax, [ebp - 0x228]
push ebx
push eax
call fcn.004fff7b
add esp, 0x10
test eax, eax
jne 0x500108
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ecx, dword [ebp - 0x258]
test eax, eax
push 0x2e
pop eax
jne 0x500140
mov eax, ecx
mov ecx, dword [ebp - 0x260]
mov edx, dword [eax]
mov eax, dword [eax + 4]
sub eax, edx
sar eax, 2
cmp ecx, eax
je 0x50010a
push 0x4ffd96
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004eda30
add esp, 0x10
jmp 0x50010a

Function at 0x500ea9
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00500b69
Function at 0x10007e00
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002653c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x124
mov dword [ebp - 0x130], ecx
lea ecx, [ebp - 0x11c]
call fcn.10009110
mov dword [ebp - 4], 0
push 0x2001f
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x130]
mov edx, dword [ecx]
push edx
lea ecx, [ebp - 0x11c]
call fcn.10007db0
mov dword [ebp - 0x110], eax
cmp dword [ebp - 0x110], 0
je 0x10007e8b
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x124], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x11c]
call fcn.10007ca0
mov eax, dword [ebp - 0x124]
jmp 0x10007f51
mov dword [ebp - 0x120], 0x100
lea ecx, [ebp - 0x118]
push ecx
push 0
push 0
push 0
lea edx, [ebp - 0x120]
push edx
lea eax, [ebp - 0x10c]
push eax
push 0
mov ecx, dword [ebp - 0x11c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x10007f19
lea edx, [ebp - 0x10c]
push edx
lea ecx, [ebp - 0x11c]
call fcn.10007e00
mov dword [ebp - 0x110], eax
cmp dword [ebp - 0x110], 0
je 0x10007f0a
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x128], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x11c]
call fcn.10007ca0
mov eax, dword [ebp - 0x128]
jmp 0x10007f51
mov dword [ebp - 0x120], 0x100
jmp 0x10007e95
lea ecx, [ebp - 0x11c]
call fcn.10007d00
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x130]
call fcn.10007cc0
mov dword [ebp - 0x12c], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x11c]
call fcn.10007ca0
mov eax, dword [ebp - 0x12c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
Function at 0x10008400
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov dword [ebp - 4], ecx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
mov ecx, dword [ebp + 8]
push ecx
push 1
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esp, ebp
pop ebp
ret 8

Function at 0x10008610
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jge 0x10008669
mov edx, 1
test edx, edx
je 0x10008651
jmp 0x10008665
push 0x1013e084
push 0
push 0x100
call fcn.10018300
add esp, 0xc
xor eax, eax
jmp 0x10008672
xor eax, eax
cmp eax, dword [ebp - 4]
sbb eax, eax
neg eax
mov esp, ebp
pop ebp
ret 4

Function at 0x10008680
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1010
call fcn.1001fdf0
mov dword [ebp - 0x1010], ecx
mov dword [ebp - 8], 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x100086e8
mov edx, 1
test edx, edx
je 0x100086d0
jmp 0x100086e4
push 0x1013e09c
push 0
push 0x100
call fcn.10018300
add esp, 0xc
xor eax, eax
jmp 0x10008742
cmp dword [ebp - 8], 1
jne 0x10008739
mov dword [ebp - 0x100c], 0x1000
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x100c]
push eax
lea ecx, [ebp - 0x1008]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x10008735
movsx eax, byte [ebp - 0x1008]
test eax, eax
je 0x10008735
mov eax, 1
jmp 0x10008742
xor eax, eax
jmp 0x10008742
xor ecx, ecx
cmp ecx, dword [ebp - 8]
sbb eax, eax
neg eax
mov esp, ebp
pop ebp
ret 4
Function at 0x403a5b
Capabilities:
Execute syscall

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x5c]
push ebx
push esi
mov ebx, dword [eax + 0x10]
push edi
stosd dword es:[edi], eax
js 0x403a42
mov edx, edi
mov dword [ebp - 4], edx
mov esi, edx
test ecx, ecx
js 0x403a6e
imul eax, edx, 0x14
add ebx, 8
add eax, ebx
mov ebx, dword [ebp + 0x10]
ret 0x8314
cmp edx, 0xffffffff
je 0x403a8d
sub eax, 0x14
dec edx
cmp dword [eax - 4], ebx
jge 0x403a5e
cmp ebx, dword [eax]
jle 0x403a63
cmp edx, 0xffffffff
jne 0x403a6a
mov esi, dword [ebp - 4]
dec ecx
mov dword [ebp - 4], edx
test ecx, ecx
jns 0x403a4c
inc edx
cmp esi, edi
ja 0x403a8d
cmp edx, esi
ja 0x403a8d
mov eax, dword [ebp + 0x28]
or ecx, dword [ebp + 0xc]
push edi
mov dword [eax + 0xc], esi
pop esi
mov dword [eax], ecx
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
pop ebx
leave
ret
call fcn.00407139
int3
Function at 0x403f23
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x7c
mov eax, 0x405eb7
call fcn.0040587b
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x58]
and dword [ebp - 0x4c], 0
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x88], eax
mov esi, 0x400
lea eax, [ebp - 0x50]
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x84], eax
lea edx, [ebp - 0x88]
lea eax, [ebp - 0x54]
mov dword [ebp - 0x50], 0x402148
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x78], eax
call fcn.0040506f
xor edx, edx
xor eax, eax
push 7
mov dword [ebp - 4], edx
pop ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x34], edx
mov word [ebp - 0x44], ax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], edx
mov word [ebp - 0x2c], ax
mov byte [ebp - 4], 3
mov edi, edx
shr esi, 1
lea ecx, [ebp - 0x2c]
push esi
call fcn.0040469a
cmp dword [ebp - 0x34], 0
jne 0x403fb1
mov eax, dword [ebp - 0x50]
jmp 0x403fbd
cmp dword [ebp - 0x30], 8
mov eax, dword [ebp - 0x44]
jae 0x403fbd
lea eax, [ebp - 0x44]
cmp dword [ebp - 0x18], 8
mov ecx, dword [ebp - 0x2c]
jae 0x403fc9
lea ecx, [ebp - 0x2c]
lea edx, [ebp - 0x48]
push edx
push ecx
lea ecx, [ebp - 0x58]
push ecx
push 2
push dword [ebp - 0x54]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
mov esi, eax
cmp esi, 0xea
jne 0x403ffa
mov eax, edi
inc edi
cmp eax, 3
jae 0x403ffa
mov esi, dword [ebp - 0x48]
jmp 0x403f9b
test esi, esi
jle 0x404007
movzx esi, si
or esi, 0x80070000
mov dword [ebp - 0x4c], esi
lea ecx, [ebp - 0x2c]
test esi, esi
jns 0x40403a
xor ebx, ebx
push ebx
push 1
call fcn.004049dc
push ebx
push 1
lea ecx, [ebp - 0x44]
call fcn.004049dc
cmp byte [ebp - 0x60], bl
je 0x404036
lea ecx, [ebp - 0x74]
mov byte [ebp - 0x60], bl
call fcn.004041e4
mov eax, esi
jmp 0x4040af
mov eax, dword [ebp - 0x48]
dec eax
shr eax, 1
push eax
call fcn.0040469a
lea eax, [ebp - 0x2c]
mov ecx, ebx
push eax
call fcn.004044a5
xor ebx, ebx
lea ecx, [ebp - 0x2c]
push ebx
push 1
call fcn.004049dc
push ebx
push 1
lea ecx, [ebp - 0x44]
call fcn.004049dc
cmp byte [ebp - 0x60], bl
je 0x404079
lea ecx, [ebp - 0x74]
mov byte [ebp - 0x60], bl
call fcn.004041e4
xor eax, eax
jmp 0x4040af
call fcn.0040582c
ret 4
Function at 0x4040bc
Capabilities:
Set environment variable

Disassembly:
push 0x3c
mov eax, 0x405ef4
call fcn.0040587b
xor edi, edi
xor eax, eax
push 7
mov dword [ebp - 4], edi
pop esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], edi
mov word [ebp - 0x44], ax
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 1
push eax
mov edx, 0x402118
call fcn.00403f23
test eax, eax
jns 0x4040ff
push 0x402148
lea ecx, [ebp - 0x44]
call fcn.0040457a
cmp dword [ebp - 0x30], 8
mov eax, dword [ebp - 0x44]
jae 0x40410b
lea eax, [ebp - 0x44]
push eax
push 0x4021c8
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x40412d
push ecx
mov ecx, dword [ebp + 4]
mov edx, 0x1643
call fcn.00403866
mov esi, eax
jmp 0x4041aa
xor eax, eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], edi
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 2
push eax
mov edx, 0x4021f4
call fcn.00403f23
test eax, eax
jns 0x40415c
push 0x402220
lea ecx, [ebp - 0x2c]
call fcn.0040457a
lea ecx, [ebp - 0x2c]
call fcn.00403b63
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x404170
lea eax, [ebp - 0x2c]
push eax
push 0x402264
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x40419d
push ecx
mov ecx, dword [ebp + 4]
mov edx, 0x1650
call fcn.00403866
push edi
push 1
lea ecx, [ebp - 0x2c]
mov esi, eax
call fcn.004049dc
jmp 0x4041aa
push edi
push 1
lea ecx, [ebp - 0x2c]
call fcn.004049dc
mov esi, edi
push edi
push 1
lea ecx, [ebp - 0x44]
call fcn.004049dc
mov eax, esi
jmp 0x4041d9
call fcn.0040582c
ret
Function at 0x4042a8
Capabilities:
Delete registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x405f2e
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0xc]
xor edi, edi
inc edi
xor esi, esi
cmp dword [ebp + 8], edi
jle 0x4043e8
push dword [ebx + edi*4]
and dword [esp + 0x2c], 0
lea ecx, [esp + 0x1c]
xor eax, eax
mov dword [esp + 0x30], 7
mov word [esp + 0x1c], ax
call fcn.0040457a
and dword [esp + 0x40], 0
cmp dword [esp + 0x2c], 8
mov eax, dword [esp + 0x18]
jae 0x404326
lea eax, [esp + 0x18]
push 0x402290
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x40437e
call fcn.004040bc
and dword [esp + 0x14], 0
mov dword [esp + 0x10], 0x40234c
lea edx, [esp + 0x10]
mov byte [esp + 0x40], 1
call fcn.00403ded
test eax, eax
js 0x40436b
push 0x4022fc
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x40234c
call fcn.00404a8c
jmp 0x4043cc
cmp dword [esp + 0x2c], 8
mov eax, dword [esp + 0x18]
jae 0x40438d
lea eax, [esp + 0x18]
push 0x4022ac
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x4043a6
mov esi, 0x402094
jmp 0x4043cc
cmp dword [esp + 0x2c], 8
mov eax, dword [esp + 0x18]
jae 0x4043b5
lea eax, [esp + 0x18]
push 0x4022d4
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x4043cc
mov esi, 0x4020a8
or dword [esp + 0x40], 0xffffffff
lea ecx, [esp + 0x18]
push 0
push 1
call fcn.004049dc
inc edi
cmp edi, dword [ebp + 8]
jl 0x4042f2
push 0
push esi
push 0
push 0
call dword [sym.imp.diagtrack.dll_RunDll32Main]
xor eax, eax
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.004055c0
mov esp, ebp
pop ebp
ret

Function at 0x4059af
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x4064c0
call fcn.00405d50
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x405a0f
cmp eax, 0xffffffff
je 0x405a0f
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x405a08
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x405a08
cmp edx, 0x10000000
jae 0x405a08
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x4550
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
jmp 0x405a05
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
call fcn.00405d95
ret 4
Function at 0x405a80
Capabilities:
Enumerate pe sections

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

Function at 0x405ba0
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x405bb6
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
xor eax, eax
cmp dword [ecx], 0x4550
jne 0x405bd1
mov edx, 0x10b
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret