joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405550
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x14]
sub esp, 0x14
mov ecx, dword [ebp + 0xc]
mov eax, dword [eax]
push ebx
xor ebx, ebx
and eax, 7
cmp ecx, 5
jae 0x405570
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
add dword [ebp + 0x10], 5
lea edx, [ecx - 4]
push esi
mov esi, dword [ebp + 8]
push edi
or edi, 0xffffffff
add edx, esi
mov dword [ebp - 4], edx
add esi, ebx
mov dword [ebp - 8], esi
cmp esi, edx
jae 0x4055a2
nop dword [eax]
mov cl, byte [esi]
and cl, 0xfe
cmp cl, 0xe8
je 0x40559f
inc esi
cmp esi, edx
jb 0x405590
mov dword [ebp - 8], esi
mov ebx, esi
sub ebx, dword [ebp + 8]
mov ecx, ebx
sub ecx, edi
cmp esi, edx
jae 0x4056ca
cmp ecx, 3
jbe 0x4055e2
xor eax, eax
mov cl, byte [esi + 4]
mov edi, ebx
mov dword [ebp - 0x14], edi
test cl, cl
je 0x405620
cmp cl, 0xff
je 0x405620
mov edx, dword [ebp - 4]
and eax, 3
mov esi, dword [ebp + 8]
add eax, eax
mov ecx, 1
or eax, 1
add ebx, ecx
jmp 0x405584
dec ecx
shl eax, cl
and eax, 7
je 0x4055ba
cmp byte [eax + 0x41d4f0], 0
je 0x40560d
movzx ecx, byte [eax + 0x41d4f8]
mov edx, esi
sub edx, ecx
mov cl, byte [edx + 4]
test cl, cl
je 0x40560a
cmp cl, 0xff
jne 0x4055ba
mov edx, dword [ebp - 4]
mov esi, dword [ebp + 8]
and eax, 3
add eax, eax
mov edi, ebx
or eax, 1
inc ebx
jmp 0x405584
movzx edi, cl
movzx ecx, byte [esi + 3]
shl edi, 8
or edi, ecx
movzx ecx, byte [esi + 2]
shl edi, 8
or edi, ecx
movzx ecx, byte [esi + 1]
mov esi, dword [ebp + 0x10]
shl edi, 8
or edi, ecx
cmp dword [ebp + 0x18], 0
je 0x40564e
lea edx, [edi + ebx]
add edx, esi
jmp 0x405654
mov edx, edi
sub edx, ebx
sub edx, esi
test eax, eax
je 0x405692
movzx edi, byte [eax + 0x41d4f8]
mov ecx, 0x18
shl edi, 3
sub ecx, edi
mov dword [ebp - 0x10], edi
mov edi, edx
shr edi, cl
mov ecx, edi
mov dword [ebp - 0xc], edi
test cl, cl
je 0x40567e
cmp cl, 0xff
jne 0x405692
mov ecx, 0x20
mov edi, 1
sub ecx, dword [ebp - 0x10]
shl edi, cl
dec edi
xor edi, edx
jmp 0x405641
mov esi, dword [ebp - 8]
mov ecx, edx
mov edi, dword [ebp - 0x14]
shr ecx, 0x18
and cl, 1
neg cl
mov byte [esi + 1], dl
mov byte [esi + 4], cl
mov ecx, edx
shr ecx, 0x10
mov byte [esi + 3], cl
mov ecx, edx
mov edx, dword [ebp - 4]
shr ecx, 8
mov byte [esi + 2], cl
mov ecx, 5
mov esi, dword [ebp + 8]
add ebx, ecx
jmp 0x405584
pop edi
pop esi
cmp ecx, 3
jbe 0x4056df
mov ecx, dword [ebp + 0x14]
xor eax, eax
mov dword [ecx], eax
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
dec ecx
shl eax, cl
mov ecx, dword [ebp + 0x14]
and eax, 7
mov dword [ecx], eax
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x409a80
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x409ad9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x409ad9
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x409aca
cmp esi, edx
jae 0x409ad9
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x409ab8
cmp esi, edx
jae 0x409ad9
cmp word [esi], 0
je 0x409ad9
mov eax, esi
pop esi
pop ebp
ret
xor eax, eax
pop esi
pop ebp
ret

Function at 0x409b40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4243cc]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, ecx
cmp dword [edi + 0x38], 0
je 0x409c08
cmp byte [edi + 0x3d], 0
je 0x409c08
mov eax, dword [edi]
push esi
push 0xffffffffffffffff
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x41d2f4]
mov ecx, edi
call esi
cmp eax, 0xffffffff
je 0x409bf6
mov ecx, dword [edi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [edi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x409bbd
sub eax, 1
je 0x409bc1
sub eax, 2
jne 0x409bf6
mov byte [edi + 0x3d], al
mov al, 1
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret
mov byte [edi + 0x3d], 0
mov esi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub esi, eax
je 0x409bdf
push dword [edi + 0x4c]
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x409bf6
cmp byte [edi + 0x3d], 0
pop esi
sete al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret
pop esi
xor al, al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop edi
call fcn.0041a150
mov esp, ebp
pop ebp
ret
Function at 0x40a110
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x4243cc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40a140
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x40a170
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x40a170
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x40a26a
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40a199
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x40a1cd
push dword [esi + 0x4c]
movsx eax, bl
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
test eax, eax
js 0x40a26a
cmp eax, 1
jle 0x40a22b
cmp eax, 3
jne 0x40a26a
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.00407b10
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40a249
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40a26a
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x40a26a
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041a150
mov esp, ebp
pop ebp
ret 4
Function at 0x40a9b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x40a9dc
jl 0x40a9d0
test esi, esi
jne 0x40a9dc
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x40a9f5
push eax
push esi
push ecx
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, esi
mov edx, dword [eax]
test edx, edx
je 0x40aa08
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
jmp 0x40aa0a
xor eax, eax
mov dword [ebp - 4], esi
test eax, eax
je 0x40aa39
mov edi, dword [ebp + 0xc]
cmp eax, edi
cmovb esi, eax
push esi
push edx
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp - 8], esi
add esp, 0xc
mov dword [ebp - 4], edi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0xc]
cmp dword [ebx + 0x4c], 0
je 0x40aae5
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x40aa64
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov eax, dword [ebp - 4]
mov edx, eax
mov ecx, dword [ebp - 8]
mov dword [ebp - 4], edx
cmp eax, 0xfff
jbe 0x40aaa4
push dword [ebx + 0x4c]
push 0xfff
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, dword [ebp - 8]
sub edi, eax
add ecx, eax
mov dword [ebp - 4], edi
add esp, 0x10
mov dword [ebp - 8], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x40aad2
cmp edi, eax
ja 0x40aa76
cmp dword [ebp - 4], 0
jbe 0x40aae8
push dword [ebx + 0x4c]
push edi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, dword [ebp - 4]
add esp, 0x10
sub edx, eax
sub esi, edx
mov edx, dword [ebp + 0x10]
mov eax, esi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 0x10]
sub esi, edi
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp - 4]
sub esi, edx
mov edx, dword [ebp + 0x10]
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40ab00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x40ab25
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov eax, dword [eax]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], eax
test eax, eax
je 0x40ab46
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x40ab48
xor eax, eax
cdq
mov dword [ebp - 4], eax
mov ecx, edx
mov dword [ebp - 8], ecx
test edi, edi
jl 0x40abc6
jg 0x40ab5b
test esi, esi
je 0x40abc6
test ecx, ecx
jl 0x40ab9f
jg 0x40ab65
test eax, eax
je 0x40ab9f
cmp edi, ecx
jg 0x40ab77
jl 0x40ab6f
cmp esi, eax
jae 0x40ab77
mov eax, esi
mov dword [ebp - 4], esi
mov dword [ebp - 8], edi
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 4]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x30]
add edx, ecx
sub esi, ecx
sbb edi, dword [ebp - 8]
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
jmp 0x40aba2
mov edx, dword [ebp + 8]
test edi, edi
jl 0x40abc6
jg 0x40abac
test esi, esi
je 0x40abc6
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x40abc6
push eax
push esi
push 1
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40c930
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41bf08
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x4243cc]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
push 0x40
mov dword [edi], 0
mov dword [edi + 4], 0
call fcn.0041a1af
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [edi], eax
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.JSON
mov esi, eax
push 0x66
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, eax
mov dword [ebp - 0x1c], 0
mov ecx, edx
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
lea esi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40c9d0
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x2c]
call fcn.0040d040
push 1
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.004118e2
add esp, 0xc
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.00411401
mov ebx, eax
cmp edi, ebx
je 0x40ca97
mov esi, dword [edi]
mov ecx, edi
push dword [esi + 4]
push edi
call fcn.0040abe0
push dword [ebp - 0x14]
mov dword [esi + 4], esi
mov ecx, edi
mov dword [esi], esi
mov dword [esi + 8], esi
push dword [edi]
mov dword [edi + 4], 0
mov eax, dword [ebx]
push dword [eax + 4]
call fcn.0040c680
mov ecx, eax
mov eax, dword [edi]
mov dword [eax + 4], ecx
mov esi, dword [edi]
mov eax, dword [ebx + 4]
mov dword [edi + 4], eax
mov edx, dword [esi + 4]
cmp byte [edx + 0xd], 0
jne 0x40ca90
mov ecx, dword [edx]
cmp byte [ecx + 0xd], 0
jne 0x40ca6c
nop dword [eax + eax]
mov eax, dword [ecx]
mov edx, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x40ca60
mov dword [esi], edx
mov edx, dword [edi]
mov ecx, dword [edx + 4]
mov eax, dword [ecx + 8]
cmp byte [eax + 0xd], 0
jne 0x40ca8b
nop dword [eax]
mov ecx, eax
mov eax, dword [ecx + 8]
cmp byte [eax + 0xd], 0
je 0x40ca80
mov dword [edx + 8], ecx
jmp 0x40ca97
mov dword [esi], esi
mov ecx, dword [edi]
mov dword [ecx + 8], ecx
lea ecx, [ebp - 0x44]
call fcn.0040ae60
lea ecx, [ebp - 0x2c]
call fcn.004084d0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40d460
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41bfcb
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x4243cc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
lea ecx, [ebp - 0x234]
push 0x424074
call fcn.0040ac70
push 0x1e
push str.IgnoreWebResourceInstallErrors
lea ecx, [ebp - 0x234]
mov dword [ebp - 4], 0
call fcn.0040aef0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x21c], 0x208
cmp dword [ebp - 0x220], 8
lea ecx, [ebp - 0x238]
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
push ecx
push 1
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40d575
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0
push dword [ebp - 0x238]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40d575
push dword [ebp - 0x238]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, 0x41d984
lea eax, [ebp - 0x218]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d568
test dx, dx
je 0x40d564
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d568
add eax, 4
add ecx, 4
test dx, dx
jne 0x40d542
xor eax, eax
jmp 0x40d56d
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40d575
xor esi, esi
jmp 0x40d587
cmp dword [esi + 0x10], 0
je 0x40d584
push esi
call fcn.0040e0f0
add esp, 4
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x220]
mov dword [ebp - 4], 1
cmp ecx, 8
jb 0x40d5ac
inc ecx
push ecx
push dword [ebp - 0x234]
lea ecx, [ebp - 0x234]
call fcn.00409fe0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret

Function at 0x40d700
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c008
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x4243cc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x424074
lea ecx, [ebp - 0x28]
xor esi, esi
call fcn.0040ac70
push 0xb
push str.WebResource
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], esi
call fcn.0040aef0
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x2c]
push ecx
push 1
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push esi
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40d78d
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
test eax, eax
mov ecx, 1
cmove esi, ecx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], 1
cmp ecx, 8
jb 0x40d7a9
inc ecx
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.00409fe0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret
Function at 0x40e550
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x40e561
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40e579
test al, 0x10
je 0x40e579
mov eax, 1
pop esi
pop ebp
ret
cmp dword [esi + 0x14], 8
jb 0x40e581
mov esi, dword [esi]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
pop esi
pop ebp
ret

Function at 0x40e590
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 8
jb 0x40e59e
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40e5b5
test al, 0x10
jne 0x40e5b5
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x40e5c0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c15b
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x4243cc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x234]
push 0x424074
mov dword [ebp - 0x21c], esi
call fcn.0040ac70
push 0xb
push str.InstallPath
lea ecx, [ebp - 0x234]
mov dword [ebp - 4], 0
call fcn.0040aef0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x21c], 0x208
cmp dword [ebp - 0x220], 8
lea ecx, [ebp - 0x238]
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
push ecx
push 1
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40e6d3
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0
push dword [ebp - 0x238]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40e6c7
xor eax, eax
mov dword [esi + 0x10], 0
push eax
mov dword [esi + 0x14], 7
mov ecx, esi
push 0x41d6c4
mov word [esi], ax
call fcn.00409e20
mov ecx, dword [ebp - 0x220]
mov dword [ebp - 4], 1
cmp ecx, 8
jb 0x40e733
inc ecx
push ecx
jmp 0x40e722
push dword [ebp - 0x238]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov dword [esi + 0x10], 0
lea ecx, [ebp - 0x218]
mov dword [esi + 0x14], 7
mov word [esi], ax
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e6f0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00409e20
mov eax, dword [ebp - 0x220]
mov dword [ebp - 4], 2
cmp eax, 8
jb 0x40e733
inc eax
push eax
push dword [ebp - 0x234]
lea ecx, [ebp - 0x234]
call fcn.00409fe0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret
Function at 0x40e920
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c1f2
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x4243cc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov dword [ebp - 0x23c], esi
mov dword [ebp - 0x238], 0
movups xmm0, xmmword [0x41d864]
mov ax, word [0x41d87c]
push 0x208
mov word [ebp - 0x14], ax
lea eax, [ebp - 0x234]
movups xmmword [ebp - 0x2c], xmm0
push 0
movq xmm0, qword [0x41d874]
push eax
movq qword [ebp - 0x1c], xmm0
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
add esp, 0xc
mov word [esi], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x234]
push eax
push 0x104
mov dword [ebp - 0x238], 1
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x40ea48
lea ecx, [ebp - 0x234]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e9d6
sub ecx, edx
lea eax, [ebp - 0x234]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00409e20
lea ecx, [ebp - 0x2c]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ea00
sub ecx, edx
lea eax, [ebp - 0x2c]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.0040aef0
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x40ea25
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40ea35
test al, 0x10
jne 0x40ea48
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x40ea3f
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret