joyce8/EMBER2024-capa huggingface dataset:
Function at 0x412e70
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
mov ecx, dword [esp + 0x14]
push ebx
push esi
mov esi, eax
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
push edi
mov edi, dword [esi]
mov dword [esp + 0x10], edi
mov edi, dword [esi + 4]
mov dword [esp + 0xc], edi
mov edi, dword [esi + 8]
mov esi, dword [esi + 0xc]
mov dword [esp + 0x14], esi
xor edx, edx
mov dword [esp + 0x18], edi
mov esi, 0x20
mov edi, ecx
sar edi, 5
add edi, dword [esp + 0xc]
mov ebx, ecx
shl ebx, 4
add ebx, dword [esp + 0x10]
sub edx, 0x61c88647
xor edi, ebx
lea ebx, [edx + ecx]
xor edi, ebx
add eax, edi
mov edi, eax
sar edi, 5
add edi, dword [esp + 0x14]
mov ebx, eax
shl ebx, 4
add ebx, dword [esp + 0x18]
sub esi, 1
xor edi, ebx
lea ebx, [edx + eax]
xor edi, ebx
add ecx, edi
test esi, esi
jg 0x412ea3
mov edx, dword [esp + 0x20]
pop edi
pop esi
mov dword [edx], eax
mov dword [edx + 4], ecx
pop ebx
add esp, 0x10
ret

Function at 0x412f00
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
push ebx
push esi
mov esi, eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
push edi
mov edi, dword [esi]
mov dword [esp + 0x18], edi
mov edi, dword [esi + 4]
mov dword [esp + 0x14], edi
mov edi, dword [esi + 8]
mov esi, dword [esi + 0xc]
mov dword [esp + 0xc], esi
mov edx, 0xc6ef3720
mov dword [esp + 0x10], edi
mov esi, 0x20
mov edi, ecx
sar edi, 5
add edi, dword [esp + 0xc]
mov ebx, ecx
shl ebx, 4
add ebx, dword [esp + 0x10]
sub esi, 1
xor edi, ebx
lea ebx, [edx + ecx]
xor edi, ebx
sub eax, edi
mov edi, eax
sar edi, 5
add edi, dword [esp + 0x14]
mov ebx, eax
shl ebx, 4
add ebx, dword [esp + 0x18]
xor edi, ebx
lea ebx, [edx + eax]
xor edi, ebx
sub ecx, edi
add edx, 0x61c88647
test esi, esi
jg 0x412f36
mov edx, dword [esp + 0x20]
pop edi
pop esi
mov dword [edx], ecx
mov dword [edx + 4], eax
pop ebx
add esp, 0x10
ret
Function at 0x416160
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 8
cmp dword [0x436dd8], 0
push esi
push edi
mov edi, eax
je 0x4162b4
test ebx, ebx
je 0x4162b4
cmp dword [0x436ff0], 0
jne 0x416199
mov eax, dword [0x436dd4]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, edi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4161a0
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
sub eax, edx
push 0
sar eax, 1
lea ecx, [esp + 0xc]
push ecx
lea edx, [eax + eax]
mov eax, dword [0x436dd8]
push edx
push edi
push eax
call esi
mov ecx, dword [esp + 8]
mov eax, dword [ebp + 8]
add dword [0x436fe8], ecx
push 0
lea edx, [esp + 0xc]
push edx
mov edx, dword [0x436dd8]
lea ecx, [eax + eax]
push ecx
push ebx
push edx
call esi
mov eax, dword [0x436fe8]
add eax, dword [esp + 8]
cmp eax, dword [0x436ddc]
mov dword [0x436fe8], eax
jl 0x41620f
cmp dword [0x436ff8], 0
jne 0x41620f
call fcn.00415e50
cmp dword [0x436ff0], 0
jne 0x416224
mov eax, dword [0x436dd4]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [0x436b08], 0
je 0x4162aa
call fcn.00411800
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 8]
push ebx
push edi
push str._s__s
shr ecx, 1
push ecx
push edx
mov dword [esp + 0x20], eax
call fcn.00416b43
mov eax, dword [0x436b74]
add esp, 0x14
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x436b7c]
mov edx, dword [eax + 4]
lea edi, [eax + 4]
lea ecx, [esp + 0xc]
push ecx
push edx
push eax
call fcn.00411d10
mov ecx, 0x436b78
mov esi, eax
call fcn.00411d50
mov ecx, dword [0x436b74]
mov dword [edi], esi
mov eax, dword [esi + 4]
push ecx
mov dword [eax], esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [0x436b08]
push 0
push 0
push 0xa710
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x416bff
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x416c2c
call fcn.00418dad
mov dword [eax], esi
call fcn.00418d9a
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.00416f76
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x416c08
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x416c5b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00418dc0
pop ecx
call fcn.00418d9a
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x416c82
test al, 1
je 0x416c82
test byte [esp + 0xc], 2
je 0x416c82
call fcn.00418dad
mov dword [eax], 5
call fcn.00418d9a
mov dword [eax], 0xd
jmp 0x416c52
xor eax, eax
pop esi
ret

Function at 0x4170e8
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x434284]
jne 0x4170f2
repz ret
jmp fcn.0041c340
Function at 0x417667
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x4176a4
cmp dword [ebp + 0x14], edi
je 0x4176a4
cmp ecx, edi
jne 0x4176ab
call fcn.00418d9a
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.00416f76
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x4176bf
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x4176e0
cmp ebx, 0xffffffff
je 0x4176cf
push ebx
push edi
push ecx
call fcn.0041b5e0
add esp, 0xc
cmp esi, edi
je 0x41768c
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x41768c
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x4176fc
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x417703
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x4177f4
test word [esi + 0xc], 0x10c
je 0x417757
mov eax, dword [esi + 4]
test eax, eax
je 0x417757
jl 0x417855
cmp ebx, eax
mov edi, ebx
jb 0x417728
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x4177fc
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00416b84
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x4177ec
cmp ebx, dword [ebp - 0xc]
jb 0x4177c4
cmp dword [ebp - 0xc], 0
je 0x417781
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x417776
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x41777d
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x41778c
mov eax, SysReAllocString
cmp ebx, eax
ja 0x41778c
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x417828
push eax
push dword [ebp - 8]
push esi
call fcn.0041decb
pop ecx
push eax
call fcn.0041ddce
add esp, 0xc
test eax, eax
je 0x417867
cmp eax, 0xffffffff
je 0x417855
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x4177ec
push esi
call fcn.0041d6ed
cmp eax, 0xffffffff
pop ecx
je 0x417859
cmp dword [ebp - 4], 0
je 0x417828
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x41770b
mov eax, dword [ebp + 0x14]
jmp 0x4176a6
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x417813
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.0041b5e0
add esp, 0xc
call fcn.00418d9a
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x41769c
cmp dword [ebp + 0xc], 0xffffffff
je 0x41783e
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.0041b5e0
add esp, 0xc
call fcn.00418d9a
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x41769c
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x4176a6
or dword [esi + 0xc], 0x10
jmp 0x417859
Function at 0x41c444
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4342e0]
je 0x41c45f
inc edi
cmp edi, 0x17
jb 0x41c450
cmp edi, 0x17
jae 0x41c5df
push ebp
push 3
call fcn.004234fa
cmp eax, 1
pop ecx
je 0x41c5ab
push 3
call fcn.004234fa
test eax, eax
pop ecx
jne 0x41c493
cmp dword [0x4340cc], 1
je 0x41c5ab
cmp ebx, 0xfc
je 0x41c5de
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x436380
push ebp
call fcn.00417b29
add esp, 0xc
test eax, eax
je 0x41c4c9
push esi
push esi
push esi
push esi
push esi
call fcn.00416e7a
add esp, 0x14
push 0x104
mov esi, 0x436399
push esi
push 0
mov byte [0x43649d], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41c50d
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00417b29
add esp, 0xc
test eax, eax
je 0x41c50d
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00416e7a
add esp, 0x14
push esi
call fcn.00419080
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x41c552
push esi
call fcn.00419080
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x436694
push 0x42b60c
sub ecx, eax
push ecx
push eax
call fcn.0041837c
add esp, 0x14
test eax, eax
je 0x41c552
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00416e7a
add esp, 0x14
jmp 0x41c554
xor esi, esi
push 0x42b608
push ebx
push ebp
call fcn.0041830b
add esp, 0xc
test eax, eax
je 0x41c574
push esi
push esi
push esi
push esi
push esi
call fcn.00416e7a
add esp, 0x14
push dword [edi*8 + 0x4342e4]
push ebx
push ebp
call fcn.0041830b
add esp, 0xc
test eax, eax
je 0x41c596
push esi
push esi
push esi
push esi
push esi
call fcn.00416e7a
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.0042333d
add esp, 0xc
jmp 0x41c5de
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x41c5de
cmp ebp, 0xffffffff
je 0x41c5de
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4342e4]
push dword [esi]
call fcn.00419080
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x42333d
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0041bc5f
xor ebx, ebx
cmp dword [0x4369b4], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x423413
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4234f3
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x4234f3
push eax
call fcn.0041bbf1
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x4369b4], eax
call esi
push eax
call fcn.0041bbf1
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4369b8], eax
call esi
push eax
call fcn.0041bbf1
mov dword [0x4369bc], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004171a5
test eax, eax
pop ecx
pop ecx
je 0x4233e1
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00416e7a
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x423413
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0041bbf1
cmp eax, ebx
pop ecx
mov dword [0x4369c4], eax
je 0x423413
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0041bbf1
pop ecx
mov dword [0x4369c0], eax
mov eax, dword [0x4369c0]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x423498
cmp dword [0x4369c4], ecx
je 0x423498
push eax
call fcn.0041bc68
push dword [0x4369c4]
mov esi, eax
call fcn.0041bc68
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x423498
cmp edi, ebx
je 0x423498
call esi
cmp eax, ebx
je 0x423465
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x423465
test byte [ebp - 0x18], 1
jne 0x423498
lea eax, [ebp - 0x10]
push eax
call fcn.004171dc
test eax, eax
pop ecx
je 0x423480
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00416e7a
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x42348f
or dword [ebp + 0x10], 0x200000
jmp 0x4234d3
or dword [ebp + 0x10], 0x40000
jmp 0x4234d3
mov eax, dword [0x4369b8]
cmp eax, dword [ebp - 8]
je 0x4234d3
push eax
call fcn.0041bc68
cmp eax, ebx
pop ecx
je 0x4234d3
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4234d3
mov eax, dword [0x4369bc]
cmp eax, dword [ebp - 8]
je 0x4234d3
push eax
call fcn.0041bc68
cmp eax, ebx
pop ecx
je 0x4234d3
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4369b4]
call fcn.0041bc68
cmp eax, ebx
pop ecx
je 0x4234f3
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4234f5
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40acc7
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push esi
mov esi, ecx
test edx, edx
jne 0x40acd9
push 0xd
pop eax
jmp 0x40ad0a
mov ecx, edx
push ebx
push edi
xor ebx, ebx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40ace2
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push ebx
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop ebx
pop esi
pop ebp
ret 0xc

Function at 0x40ad0f
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x228
mov eax, dword [0x42d008]
xor eax, esp
mov dword [esp + 0x224], eax
push ebx
mov ebx, ecx
xor eax, eax
mov ecx, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 4]
push esi
or eax, 0x2001f
mov dword [esp + 0x1c], ecx
push eax
push ecx
push dword [ebx]
lea ecx, [esp + 0x18]
call fcn.0040ab42
jmp 0x40ad67
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x10]
call fcn.0040ad0f
mov esi, eax
test esi, esi
jne 0x40adbb
lea eax, [esp + 0x20]
mov dword [esp + 0x18], 0x100
push eax
push esi
push esi
push esi
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x3c]
push eax
push esi
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x40ad59
cmp dword [esp + 0xc], esi
je 0x40adaa
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], esi
push dword [esp + 0x1c]
mov ecx, ebx
mov dword [esp + 0x14], esi
call fcn.0040aac9
mov esi, eax
cmp dword [esp + 0xc], 0
je 0x40adcc
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x22c]
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.004118ce
mov esp, ebp
pop ebp
ret 4
Function at 0x40b4a0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x42d008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, edx
mov dword [ebp - 0x98], ecx
push esi
push 0x409174
mov dword [ebp - 0x9c], eax
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
neg eax
sbb edi, edi
and edi, esi
mov esi, dword [ebp - 0x9c]
mov ecx, esi
call fcn.0040b1b8
sub eax, 1
je 0x40b55a
sub eax, 1
je 0x40b507
sub eax, 1
je 0x40b503
push esi
push 0x4090fc
jmp 0x40b5c4
push ecx
push ebx
jmp 0x40b544
lea eax, [ebp - 0x94]
push eax
push ebx
call dword [sym.imp.ole32.dll_CLSIDFromString]
test eax, eax
jne 0x40b552
push 0x40
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
jne 0x40b53c
mov eax, 0x80070057
mov bl, 0
jmp 0x40b5a5
push ecx
lea eax, [ebp - 0x84]
push eax
mov ecx, dword [ebp - 0x98]
push edi
call fcn.0040acc7
jmp 0x40b59c
push ebx
push 0x4091b8
jmp 0x40b5c4
lea eax, [ebp - 0x9c]
push eax
push 0x409178
push ebx
call fcn.0040a948
add esp, 0xc
cmp eax, 1
jne 0x40b5be
mov eax, dword [ebp - 0x9c]
push 4
mov dword [ebp - 0xa0], eax
lea eax, [ebp - 0xa0]
push eax
mov eax, dword [ebp - 0x98]
push 4
push 0
push edi
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
sete bl
test eax, eax
je 0x40b5ac
mov ecx, 0x4091f0
jmp 0x40b5b3
mov ecx, 0x409234
mov eax, edi
push eax
push ecx
call fcn.0040a91c
mov al, bl
jmp 0x40b5cb
push ebx
push 0x409180
call fcn.0040a91c
xor al, al
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004118ce
leave
ret 8
Function at 0x40c72c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40c782
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40c782
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [ebp + 8]
lea ecx, [esi + eax]
and edx, 0xf
jbe 0x40c774
cmp esi, ecx
jae 0x40c782
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edx, 1
jne 0x40c762
cmp esi, ecx
jae 0x40c782
cmp word [esi], 0
je 0x40c782
mov eax, esi
jmp 0x40c784
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x40cda0
Capabilities:
Check if file exists
Create directory

Disassembly:
push 4
mov eax, 0x42ba3f
call fcn.00411bd6
mov edi, ecx
test edi, edi
jne 0x40cdb9
mov eax, 0x80070057
jmp 0x40ce24
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40cdc8
xor eax, eax
jmp 0x40ce24
push edi
lea ecx, [ebp - 0x10]
call fcn.0040ca88
and dword [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.0040c968
test eax, eax
jne 0x40cde8
mov esi, 0x8007000e
jmp 0x40ce17
mov ecx, dword [ebp - 0x10]
call fcn.0040cda0
mov esi, eax
test esi, esi
jne 0x40ce17
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40ce17
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40ce17
movzx esi, si
or esi, 0x80070000
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0040ae9d
mov eax, esi
call fcn.00411b9f
ret
Function at 0x40d2a1
Capabilities:
Check if file exists
Delete registry key

Disassembly:
push 0x24
mov eax, 0x42bae5
call fcn.00411c0a
mov edi, ecx
lea ecx, [ebp - 0x24]
call fcn.0040c14b
xor ebx, ebx
lea edx, [ebp - 0x24]
push ebx
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.0040d83f
mov esi, eax
test esi, esi
js 0x40d413
lea eax, [ebp - 0x24]
mov ecx, 0x42e67c
push eax
call fcn.0040ca1b
push dword [0x42e67c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40d2f9
push ecx
call fcn.0040e0bf
test al, al
je 0x40d300
mov esi, ebx
jmp 0x40d413
push 0x409760
lea ecx, [ebp - 0x28]
call fcn.0040ca88
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 1
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
mov esi, eax
test esi, esi
js 0x40d408
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.ole32.dll_StringFromCLSID]
mov esi, eax
test esi, esi
js 0x40d408
push dword [ebp - 0x30]
lea ecx, [ebp - 0x28]
call fcn.0040df48
push dword [ebp - 0x30]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ebx
lea eax, [ebp - 0x2c]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push dword [ebp - 0x28]
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
test esi, esi
je 0x40d387
jle 0x40d408
movzx esi, si
or esi, 0x80070000
jmp 0x40d408
mov ecx, dword [ebp - 0x2c]
call fcn.0040d173
mov esi, eax
test esi, esi
jns 0x40d3f1
push 1
lea edx, [ebp - 0x24]
mov ecx, edi
call fcn.0040d83f
mov esi, eax
test esi, esi
js 0x40d408
lea eax, [ebp - 0x24]
mov ecx, 0x42e67c
push eax
call fcn.0040ca1b
mov esi, dword [ebp - 0x2c]
mov dl, 1
call fcn.0040ceac
test al, al
je 0x40d3ef
push ebx
push dword [0x42e67c]
push esi
call dword [sym.imp.ADVAPI32.dll_RegSaveKeyW]
mov esi, eax
test esi, esi
je 0x40d3e8
jle 0x40d3e4
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x40d3f1
jmp 0x40d408
xor dl, dl
call fcn.0040ceac
mov esi, ebx
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x28]
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.0040ae9d
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.0040ae9d
mov eax, esi
call fcn.00411bb4
ret
Function at 0x40d83f
Capabilities:
Check if file exists
Create directory

Disassembly:
push 8
mov eax, 0x42bb29
call fcn.00411bd6
mov ebx, edx
mov edi, ecx
push 0x409610
lea ecx, [ebp - 0x10]
call fcn.0040ca88
lea eax, [ebp - 0x10]
xor esi, esi
push eax
mov ecx, ebx
mov dword [ebp - 4], esi
call fcn.0040ca1b
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.0040ae9d
test edi, edi
jne 0x40d889
mov esi, 0x80070057
jmp 0x40d979
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40d90c
push edi
lea ecx, [ebp - 0x10]
call fcn.0040ca88
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], 1
call fcn.0040c968
mov ecx, dword [ebp - 0x10]
test eax, eax
jne 0x40d8c5
lea ecx, [ecx - 0x10]
call fcn.0040ae9d
mov esi, 0x8007000e
jmp 0x40d979
call fcn.0040cda0
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x40d8f7
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40d8f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40d8f9
movzx esi, si
or esi, 0x80070000
jmp 0x40d8f9
mov eax, dword [ebp - 0x14]
mov esi, eax
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.0040ae9d
test esi, esi
js 0x40d979
push 0x4096f4
push edi
mov ecx, ebx
call fcn.0040c98d
cmp byte [ebp + 8], 0
je 0x40d979
push ecx
call fcn.0040e0bf
test al, al
jne 0x40d979
push dword [ebx]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40d979
call fcn.00411217
test eax, eax
jne 0x40d979
push 0x409610
lea ecx, [ebp + 8]
call fcn.0040ca88
lea eax, [ebp + 8]
mov dword [ebp - 4], 2
push eax
mov ecx, ebx
call fcn.0040ca1b
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.0040ae9d
push 0x40971c
push edi
mov ecx, ebx
call fcn.0040c98d
mov eax, esi
call fcn.00411b9f
ret 4