joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404f89
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x424
mov eax, 0x4307be
call fcn.0042e863
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 0x428], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x42c], ecx
mov dword [ebp - 0x430], esi
mov dword [ebp - 0x418], esi
push 2
push esi
push eax
mov byte [ebp - 4], 1
call fcn.004034a0
mov dword [ebp - 0x41c], eax
cmp eax, esi
jne 0x404fe1
call fcn.0040210b
mov esi, eax
jmp 0x4050b7
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, esi
jne 0x404ffa
call fcn.0040210b
jmp 0x4050a9
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x420], eax
cmp eax, esi
je 0x404ff0
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
lea eax, [edi + 1]
mov dword [ebp - 0x424], edi
cmp eax, edi
jae 0x405034
mov esi, 0x8007000e
jmp 0x4050ab
push eax
lea ecx, [ebp - 0x418]
mov byte [ebp - 4], 2
call fcn.00403dd0
mov dword [ebp - 4], 1
jmp 0x405062
cmp dword [ebp - 0x418], esi
je 0x40502d
push edi
push dword [ebp - 0x418]
push edi
push dword [ebp - 0x420]
push esi
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, esi
je 0x404ff0
mov edx, dword [ebp - 0x418]
push dword [ebp + 0x14]
xor ecx, ecx
mov word [edx + eax*2], cx
push dword [ebp - 0x418]
lea ecx, [ebp - 0x430]
call fcn.00404d68
mov esi, eax
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x414]
cmp dword [ebp - 0x418], eax
je 0x4050d0
lea ecx, [ebp - 0x418]
call fcn.00402cdf
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x428]
call fcn.00402c61
mov eax, esi
call fcn.0042e8bf
ret 0x10

Function at 0x4053e6
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
and dword [esi], 0
push edi
mov edi, dword [ebp + 0xc]
add eax, eax
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 8]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40544f
cmp dword [ebp + 0x10], 1
je 0x405427
cmp dword [ebp + 0x10], 2
je 0x405427
push 0xd
pop eax
jmp 0x40544f
mov eax, dword [ebp - 4]
test edi, edi
je 0x405449
test eax, eax
je 0x405444
test al, 1
jne 0x405422
mov ecx, eax
shr ecx, 1
cmp word [edi + ecx*2 - 2], 0
je 0x405449
jmp 0x405422
xor ecx, ecx
mov word [edi], cx
shr eax, 1
mov dword [esi], eax
xor eax, eax
pop edi
pop esi
leave
ret 0xc
Function at 0x405607
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b61b
pop ecx
pop ecx
test eax, eax
jne 0x405627
mov eax, 0x80004005
leave
ret 0x18
push esi
push dword [ebp + 0x14]
call fcn.004054c9
pop ecx
lea ecx, [ebp - 0x18]
mov esi, eax
call fcn.0040c23c
push dword [ebp + 0x18]
lea ecx, [ebp - 0x18]
push esi
call fcn.0040be3b
test al, al
jne 0x40565b
xor esi, esi
inc esi
lea ecx, [ebp - 0x18]
call fcn.0040bdb2
mov eax, esi
pop esi
jmp 0x405623
lea eax, [ebp + 0x10]
push eax
push 0xf003f
push 0
push dword [ebp + 0x18]
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405689
push dword [ebp + 0x1c]
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
jmp 0x40564e

Function at 0x40568d
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
lea eax, [ebp - 4]
push eax
push 0xf003f
xor esi, esi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405764
push edi
mov edi, 0xff
push 0x1fe
mov dword [ebp - 8], edi
call dword [sym.imp.MSVCR100.dll_malloc]
pop ecx
mov dword [ebp - 0xc], eax
cmp eax, esi
je 0x40575a
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea ecx, [ebp - 0x1c]
push ecx
push esi
push esi
push esi
lea ecx, [ebp - 8]
push ecx
push eax
jmp 0x405742
push esi
push esi
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x14]
push eax
push esi
push esi
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x40574f
push dword [ebp - 0xc]
push dword [ebp - 4]
call fcn.0040568d
pop ecx
pop ecx
push esi
push esi
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x10]
push eax
push esi
push esi
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x40574f
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
je 0x40574f
lea eax, [ebp - 0x1c]
push eax
push esi
push esi
push esi
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
push esi
push dword [ebp - 4]
mov dword [ebp - 8], edi
call ebx
test eax, eax
je 0x4056e9
push dword [ebp - 0xc]
call dword [sym.imp.MSVCR100.dll_free]
pop ecx
pop ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
pop esi
leave
ret
Function at 0x405773
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43c4b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b61b
pop ecx
pop ecx
test eax, eax
jne 0x4057b0
mov eax, 0x80004005
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e7ae
leave
ret 0x1c
push dword [ebp + 0x14]
call fcn.004054c9
pop ecx
lea ecx, [ebp - 0x24]
mov dword [ebp - 0xc], eax
call fcn.0040c23c
mov ebx, dword [ebp + 0x18]
push ebx
push dword [ebp - 0xc]
lea ecx, [ebp - 0x24]
call fcn.0040be3b
xor esi, esi
test al, al
jne 0x4057e6
inc esi
lea ecx, [ebp - 0x24]
call fcn.0040bdb2
mov eax, esi
jmp 0x40579c
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp ebx, esi
je 0x4057fb
push ebx
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x4057ff
xor eax, eax
jmp 0x405817
lea esi, [eax + eax]
mov eax, esi
call fcn.0042eac0
mov eax, esp
push 3
push esi
push ebx
push eax
call fcn.004053ae
xor esi, esi
push esi
lea ecx, [ebp - 8]
push ecx
push esi
push 0xf003f
push esi
push esi
push esi
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4057da
cmp dword [ebp + 0x1c], esi
je 0x405845
push dword [ebp + 0x1c]
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x405849
xor eax, eax
jmp 0x405863
lea esi, [eax + eax]
mov eax, esi
call fcn.0042eac0
mov eax, esp
push 3
push esi
push dword [ebp + 0x1c]
push eax
call fcn.004053ae
xor esi, esi
push 4
lea ecx, [ebp + 0x20]
push ecx
push 4
push esi
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4057da
Function at 0x405884
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43c4b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b61b
pop ecx
pop ecx
test eax, eax
jne 0x4058c1
mov eax, 0x80004005
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e7ae
leave
ret 0x1c
push dword [ebp + 0x14]
call fcn.004054c9
pop ecx
lea ecx, [ebp - 0x24]
mov dword [ebp - 0xc], eax
call fcn.0040c23c
mov edi, dword [ebp + 0x18]
push edi
push dword [ebp - 0xc]
lea ecx, [ebp - 0x24]
call fcn.0040be3b
xor ebx, ebx
test al, al
jne 0x4058f7
inc ebx
lea ecx, [ebp - 0x24]
call fcn.0040bdb2
mov eax, ebx
jmp 0x4058ad
cmp edi, ebx
je 0x40590a
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40590e
xor eax, eax
jmp 0x405924
lea esi, [eax + eax]
mov eax, esi
call fcn.0042eac0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.004053ae
push ebx
lea ecx, [ebp - 8]
push ecx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4058eb
mov eax, dword [ebp + 0x20]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x405946
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0x20]
push 1
push ebx
push dword [ebp + 0x1c]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4058eb
Function at 0x40597a
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x43c4b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b61b
pop ecx
pop ecx
test eax, eax
je 0x405ad5
push dword [ebp + 0x14]
call fcn.004054c9
pop ecx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0xc], eax
call fcn.0040c23c
push dword [ebp + 0x18]
lea ecx, [ebp - 0x28]
push dword [ebp - 0xc]
call fcn.0040be3b
test al, al
jne 0x4059da
xor esi, esi
inc esi
lea ecx, [ebp - 0x28]
call fcn.0040bdb2
mov eax, esi
jmp 0x405ada
mov esi, dword [ebp + 0x20]
test esi, esi
jne 0x4059e6
push 0x57
pop esi
jmp 0x4059cb
cmp word [esi], 1
jne 0x405acd
cmp dword [esi + 4], 1
jne 0x405acd
cmp dword [esi + 0x14], 0
jne 0x405acd
lea eax, [ebp - 0x10]
push eax
push esi
call dword [sym.imp.OLEAUT32.dll_SafeArrayUnaccessData]
test eax, eax
je 0x405a17
mov esi, eax
jmp 0x4059cb
cmp dword [ebp + 0x18], 0
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, 0x3fffffff
je 0x405a32
push dword [ebp + 0x18]
call edi
inc eax
cmp eax, ebx
jle 0x405a36
xor eax, eax
jmp 0x405a51
lea esi, [eax + eax]
mov eax, esi
call fcn.0042eac0
mov eax, esp
push 3
push esi
push dword [ebp + 0x18]
push eax
call fcn.004053ae
mov esi, dword [ebp + 0x20]
xor ecx, ecx
push ecx
lea edx, [ebp - 8]
push edx
push ecx
push 0xf003f
push ecx
push ecx
push ecx
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x405aba
cmp dword [ebp + 0x1c], eax
je 0x405a9d
push dword [ebp + 0x1c]
call edi
inc eax
cmp eax, ebx
jle 0x405a82
xor eax, eax
jmp 0x405a9d
lea esi, [eax + eax]
mov eax, esi
call fcn.0042eac0
mov eax, esp
push 3
push esi
push dword [ebp + 0x1c]
push eax
call fcn.004053ae
mov esi, dword [ebp + 0x20]
push dword [esi + 0x10]
push dword [ebp - 0x10]
push 3
push 0
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
lea ecx, [ebp - 0x28]
call fcn.0040bdb2
xor eax, eax
jmp 0x405ada
lea ecx, [ebp - 0x28]
call fcn.0040bdb2
mov eax, 0x80004005
lea esp, [ebp - 0x34]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e7ae
leave
ret 0x1c
Function at 0x405aee
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x43c4b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b61b
pop ecx
pop ecx
test eax, eax
jne 0x405b2b
mov eax, 0x80004005
lea esp, [ebp - 0x34]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e7ae
leave
ret 0x1c
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
xor esi, esi
mov ebx, 0x3fffffff
cmp dword [ebp + 0x20], esi
je 0x405b47
push dword [ebp + 0x20]
call edi
inc eax
cmp eax, ebx
jle 0x405b4c
mov dword [ebp - 8], esi
jmp 0x405b69
lea esi, [eax + eax]
mov eax, esi
call fcn.0042eac0
mov eax, esp
push 3
push esi
push dword [ebp + 0x20]
push eax
call fcn.004053ae
mov dword [ebp - 8], eax
xor esi, esi
push dword [ebp + 0x14]
call fcn.004054c9
pop ecx
lea ecx, [ebp - 0x28]
mov dword [ebp - 0xc], eax
call fcn.0040c23c
push dword [ebp + 0x18]
lea ecx, [ebp - 0x28]
push dword [ebp - 0xc]
call fcn.0040be3b
test al, al
jne 0x405ba1
xor esi, esi
inc esi
lea ecx, [ebp - 0x28]
call fcn.0040bdb2
mov eax, esi
jmp 0x405b17
cmp dword [ebp + 0x18], esi
je 0x405bb0
push dword [ebp + 0x18]
call edi
inc eax
cmp eax, ebx
jle 0x405bb4
xor eax, eax
jmp 0x405bce
lea esi, [eax + eax]
mov eax, esi
call fcn.0042eac0
mov eax, esp
push 3
push esi
push dword [ebp + 0x18]
push eax
call fcn.004053ae
xor esi, esi
push esi
lea ecx, [ebp - 0x10]
push ecx
push esi
push 0xf003f
push esi
push esi
push esi
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x405b92
cmp dword [ebp + 0x1c], esi
je 0x405c13
push dword [ebp + 0x1c]
call edi
inc eax
cmp eax, ebx
jg 0x405c13
lea esi, [eax + eax]
mov eax, esi
call fcn.0042eac0
mov eax, esp
push 3
push esi
push dword [ebp + 0x1c]
push eax
call fcn.004053ae
mov esi, eax
push 0
push SysReAllocString
push dword [ebp - 8]
call fcn.00405455
add esp, 0xc
inc eax
push eax
push dword [ebp - 8]
push 3
push 0
push esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
jmp 0x405b92
Function at 0x405faf
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b61b
pop ecx
pop ecx
test eax, eax
jne 0x405fcb
mov eax, 0x80004005
jmp 0x406012
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x14]
push dword [esi + 8]
call fcn.00408c61
add esp, 0xc
test al, al
jne 0x405fea
push 0x57
pop eax
jmp 0x406011
push dword [ebp + 0x1c]
mov eax, dword [esi]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [eax + 0x60]
test eax, eax
jne 0x406011
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
neg eax
sbb eax, eax
inc eax
pop esi
leave
ret 0x18

Function at 0x406016
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push dword [ebp + 0x10]
and dword [ebp - 4], 0
push dword [ebp + 0xc]
call fcn.0040b61b
pop ecx
pop ecx
test eax, eax
jne 0x406036
mov eax, 0x80004005
jmp 0x406097
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 8]
call fcn.00408c61
add esp, 0xc
test al, al
jne 0x406054
push 0x57
pop eax
jmp 0x406097
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x40606e
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x406097
cmp dword [ebp + 0x20], 0
jne 0x40607e
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp - 4]
mov dword [ecx], edx
jmp 0x406090
cmp dword [ebp - 4], 0
je 0x406089
xor eax, eax
inc eax
jmp 0x406097
cmp eax, 0x7fffffff
ja 0x406084
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
xor eax, eax
leave
ret 0x1c

Function at 0x40609b
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b61b
pop ecx
pop ecx
test eax, eax
jne 0x4060ba
mov eax, 0x80004005
jmp 0x40615b
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 8]
call fcn.00408c61
add esp, 0xc
test al, al
jne 0x4060db
push 0x57
pop eax
jmp 0x40615b
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
push edi
xor edi, edi
cmp ebx, edi
je 0x406155
mov esi, dword [ebp + 0x20]
cmp esi, edi
je 0x406155
push dword [ebp + 0x18]
push edi
push 0x11
call dword [sym.imp.OLEAUT32.dll_SafeArrayCopyData]
mov dword [esi], eax
cmp eax, edi
jne 0x406107
mov eax, 0x80004005
jmp 0x406158
lea ecx, [ebp + 0x10]
push ecx
push eax
mov dword [ebp + 0x14], edi
call dword [sym.imp.OLEAUT32.dll_SafeArrayUnaccessData]
test eax, eax
jne 0x406150
push edi
push ebx
push dword [ebp + 0x18]
mov dword [ebx], edi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406139
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x14], eax
push dword [esi]
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
cmp dword [ebp + 0x14], edi
je 0x406150
push dword [esi]
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetDim]
mov dword [esi], edi
mov eax, dword [ebp + 0x14]
jmp 0x406158
push 0x57
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x1c
Function at 0x40615f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b61b
pop ecx
pop ecx
test eax, eax
jne 0x40617f
mov eax, 0x80004005
jmp 0x406206
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 8]
call fcn.00408c61
add esp, 0xc
test al, al
jne 0x40619d
push 0x57
pop eax
jmp 0x406206
cmp dword [ebp + 0x1c], 0
push esi
je 0x406202
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x406202
cmp word [esi], 1
jne 0x4061fb
cmp dword [esi + 4], 1
jne 0x4061fb
cmp dword [esi + 0x14], 0
jne 0x4061fb
lea eax, [ebp + 0x10]
push eax
push esi
call dword [sym.imp.OLEAUT32.dll_SafeArrayUnaccessData]
mov edi, eax
test edi, edi
jne 0x406205
mov eax, dword [ebp + 0x1c]
and dword [eax], edi
push edi
push eax
push dword [esi + 0x10]
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4061f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push esi
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
mov eax, edi
jmp 0x406205
mov eax, 0x80004005
jmp 0x406205
push 0x57
pop eax
pop esi
pop edi
leave
ret 0x18

Function at 0x406451
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b61b
pop ecx
pop ecx
test eax, eax
jne 0x406472
mov eax, 0x80004005
jmp 0x4064ff
push ebx
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
cmp esi, ebx
je 0x4064f8
lea ecx, [ebp - 0x18]
call fcn.0040c23c
push 1
push ebx
push esi
lea ecx, [ebp - 0x18]
call fcn.0040beae
test al, al
jne 0x4064a2
lea ecx, [ebp - 0x18]
call fcn.0040bdb2
xor eax, eax
inc eax
jmp 0x4064fd
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4064a7
sub eax, edx
sar eax, 1
je 0x4064eb
movzx ecx, word [esi + eax*2 - 2]
cmp ecx, 0x2e
je 0x4064eb
cmp eax, 1
jbe 0x4064d4
cmp word [esi + eax*2 - 4], 0x2e
jne 0x4064d4
cmp ecx, 0x5c
je 0x4064eb
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4064ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x4064ee
xor ebx, ebx
inc ebx
lea ecx, [ebp - 0x18]
call fcn.0040bdb2
jmp 0x4064fb
xor ebx, ebx
inc ebx
mov eax, ebx
pop esi
pop ebx
leave
ret 0x10

Function at 0x40678a
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 8]
call fcn.00408c93
add esp, 0xc
test al, al
jne 0x4067ab
push 0x57
pop eax
jmp 0x4067c7
push 4
lea eax, [ebp + 0x14]
push eax
push 4
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
neg eax
sbb eax, eax
neg eax
pop ebp
ret 0x10
Function at 0x4067cb
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push esi
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 8]
call fcn.00408c93
add esp, 0xc
test al, al
jne 0x4067f0
push 0x57
pop eax
jmp 0x406895
push ebx
mov ebx, dword [ebp + 0x18]
push edi
test ebx, ebx
je 0x406890
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x406890
cmp word [edi], 1
jne 0x406889
cmp dword [edi + 4], 1
jne 0x406889
cmp dword [edi + 0x14], 0
jne 0x406889
lea eax, [ebp + 0xc]
push eax
push edi
call dword [sym.imp.OLEAUT32.dll_SafeArrayUnaccessData]
test eax, eax
jne 0x406893
cmp ebx, 2
jb 0x406889
test bl, 1
jne 0x406889
cmp dword [edi + 0x10], ebx
jne 0x406889
mov esi, dword [ebp + 0xc]
cmp byte [esi + ebx - 2], al
jne 0x406889
cmp byte [esi + ebx - 1], al
jne 0x406889
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40684c
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
cmp eax, ebx
jne 0x406889
push ebx
push esi
push 1
push 0
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x40687e
xor eax, eax
inc eax
jmp 0x406893
push edi
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
xor eax, eax
jmp 0x406893
mov eax, 0x80004005
jmp 0x406893
push 0x57
pop eax
pop edi
pop ebx
pop esi
pop ebp
ret 0x14

Function at 0x40689a
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 8]
call fcn.00408c93
add esp, 0xc
test al, al
jne 0x4068bd
push 0x57
pop eax
jmp 0x4068f7
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push 0
push dword [ebp + 0x10]
mov dword [ebp + 0xc], 4
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x4068e7
xor eax, eax
inc eax
jmp 0x4068f7
cmp dword [ebp - 4], 4
jne 0x4068e2
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 8]
mov dword [eax], ecx
xor eax, eax
leave
ret 0x10
Function at 0x4068fb
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 8]
call fcn.00408c93
add esp, 0xc
test al, al
jne 0x406920
push 0x57
pop eax
jmp 0x4069ab
push ebx
push edi
mov edi, dword [ebp + 0x18]
xor ebx, ebx
cmp edi, ebx
jne 0x406930
push 0x57
pop eax
jmp 0x4069a9
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp + 0xc], ebx
cmp esi, ebx
jne 0x40695e
lea eax, [ebp + 0xc]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x406959
mov eax, dword [ebp + 0xc]
mov dword [edi], eax
jmp 0x4069a6
xor eax, eax
inc eax
jmp 0x4069a8
mov eax, dword [edi]
push eax
push ebx
push 0x11
mov dword [ebp + 0xc], eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayCopyData]
mov dword [esi], eax
cmp eax, ebx
jne 0x40697a
mov eax, 0x80004005
jmp 0x4069a8
lea ecx, [ebp - 4]
push ecx
push eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayUnaccessData]
test eax, eax
jne 0x4069a6
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 4]
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esi]
call dword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
xor eax, eax
pop esi
pop edi
pop ebx
leave
ret 0x14

Function at 0x4069af
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 8]
call fcn.00408c93
add esp, 0xc
test al, al
jne 0x4069d0
push 0x57
pop eax
jmp 0x4069de
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
xor eax, eax
pop ebp
ret 0xc