Function at 0x402bf0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
cmp word [ecx], 0
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x54], ecx
je 0x40334d
mov eax, ecx
nop
add eax, 2
cmp word [eax], 0
jne 0x402c10
mov edi, dword [ebp - 0x54]
sub eax, edi
add eax, 0xe
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x58], eax
call eax
mov ebx, eax
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402c38
mov ecx, dword [ebp - 0x54]
sub eax, ecx
sar eax, 1
add eax, 7
mov dword [esp + 0xc], ecx
mov dword [esp + 8], str._r_n__s__r_n
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._swprintf
cmp word [ebx], 0
je 0x40336d
mov eax, ebx
nop
add eax, 2
cmp word [eax], 0
jne 0x402c70
sub eax, ebx
lea edx, [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [ebp - 0x40], eax
call eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
sub esp, 0x14
mov dword [esp], ebx
mov dword [ebp - 0x4c], eax
call eax
mov dword [esp], 0x200
mov edi, dword [ebp - 0x58]
call edi
mov dword [ebp - 0x24], eax
mov dword [esp], 0x800
call edi
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 0x800
mov dword [ebp - 0x30], 0x100
lea esi, [esi]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x18]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
test eax, eax
je 0x402d70
cmp eax, 0xea
jne 0x4031b8
mov ebx, dword [ebp - 0x1c]
cmp dword [ebp - 0x2c], ebx
jae 0x403070
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], eax
jmp 0x402ce8
mov ecx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x1c]
mov eax, 0x40a140
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
test ecx, ecx
je 0x402d90
cmp word [ecx], 0
jne 0x403120
nop
add eax, 2
cmp word [eax], 0
jne 0x402d90
sub eax, 0x40a140
sar eax, 1
mov dword [ebp - 0x3c], eax
mov eax, 0x40a140
lea esi, cs:[esi]
add eax, 2
cmp word [eax], 0
jne 0x402db0
lea ecx, [ebp - 0x10]
sub eax, 0x40a140
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40a140
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
sub esp, 0x14
cmp esi, 1
je 0x402f88
cmp esi, 4
je 0x403098
cmp esi, 3
jne 0x4030a0
mov esi, 0x40a146
lea esi, cs:[esi]
nop
add esi, 2
cmp word [esi], 0
jne 0x402e10
sub esi, 0x40a146
mov eax, 0x40a146
sar esi, 1
lea esi, cs:[esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x402e30
lea edx, [ebp - 0x10]
sub eax, 0x40a146
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40a146
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
sub esp, 0x14
test ebx, ebx
je 0x403020
mov edx, dword [ebp - 0x3c]
lea eax, [ebx + ebx*2]
add eax, eax
add edx, esi
mov dword [ebp - 0x3c], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
call eax
xor ecx, ecx
mov edi, eax
mov eax, dword [ebp - 0x28]
lea edx, [eax + ebx - 1]
mov esi, eax
add eax, ebx
mov ebx, dword [ebp - 0x3c]
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x50], eax
jmp 0x402eae
mov eax, dword [ebp - 0x50]
add esi, 1
cmp esi, eax
je 0x402fd6
movzx eax, byte [esi]
mov dword [esp + 8], str._02x
mov dword [esp + 4], 3
mov dword [esp + 0xc], eax
lea eax, [edi + ecx*2]
mov dword [ebp - 0x3c], ecx
mov dword [esp], eax
call sym._swprintf
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x48]
add eax, ecx
cmp esi, edx
je 0x402fd6
mov edx, dword [0x40a240]
add ebx, 3
lea ecx, [eax + 1]
mov dword [edi + eax*2], edx
cmp ebx, 0x4c
jbe 0x402ea0
cmp word [edi], 0
je 0x403338
mov eax, edi
lea esi, cs:[esi]
add eax, 2
cmp word [eax], 0
jne 0x402f08
sub eax, edi
lea edx, [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
mov eax, str._r_n
sub esp, 0x14
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402f40
lea ecx, [ebp - 0x10]
sub eax, str._r_n
mov dword [esp + 0x10], 0
mov ebx, 2
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], str._r_n
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
xor ecx, ecx
sub esp, 0x14
jmp 0x402ea0
mov eax, ebx
lea ecx, [ebp - 0x10]
shr eax, 1
sub eax, 1
test ebx, ebx
cmovne ebx, eax
mov eax, dword [ebp - 0x28]
mov edx, ebx
call sym._escape_string
mov ebx, eax
mov eax, dword [ebp - 0x10]
lea esi, [eax + 3]
lea eax, [esi + esi]
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
call eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str.__s_
mov edi, eax
mov dword [esp + 4], esi
mov dword [esp], eax
call sym._swprintf
mov dword [esp], ebx
mov eax, dword [ebp - 0x4c]
call eax
cmp word [edi], 0
je 0x403331
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402fe8
sub eax, edi
lea edx, [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
sub esp, 0x14
mov dword [esp], edi
mov eax, dword [ebp - 0x4c]
call eax
mov eax, 0x40a15c
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x403028
lea edx, [ebp - 0x10]
sub eax, 0x40a15c
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40a15c
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
add dword [ebp - 0x44], 1
sub esp, 0x14
jmp 0x402ce8
mov eax, dword [ebp - 0x30]
lea ebx, [eax + eax]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], eax
jmp 0x402ce8
test ebx, ebx
jne 0x4032f8
mov dword [esp], 0x1e
mov eax, dword [ebp - 0x58]
call eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.hex__x_:
mov edi, eax
mov dword [esp + 4], 0xf
mov dword [esp], eax
call sym._swprintf
cmp word [edi], 0
mov esi, eax
je 0x40333f
mov eax, edi
lea esi, cs:[esi]
add eax, 2
cmp word [eax], 0
jne 0x4030e0
sub eax, edi
lea ecx, [ebp - 0x10]
mov dword [esp + 4], edi
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
sub esp, 0x14
mov dword [esp], edi
mov eax, dword [ebp - 0x4c]
call eax
jmp 0x402e67
mov eax, ecx
lea ecx, [ebp - 0x14]
call sym._escape_string
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x48], eax
lea ecx, [edx + 4]
lea eax, [ecx + ecx]
mov dword [ebp - 0x3c], ecx
mov dword [esp], eax
mov ecx, dword [ebp - 0x58]
call ecx
mov edi, eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], 0x40a174
mov dword [esp + 0xc], eax
mov ecx, dword [ebp - 0x3c]
mov dword [esp], edi
mov dword [esp + 4], ecx
call sym._swprintf
cmp word [edi], 0
mov dword [ebp - 0x3c], eax
je 0x403346
mov eax, edi
add eax, 2
cmp word [eax], 0
jne 0x403170
sub eax, edi
lea edx, [ebp - 0x10]
mov dword [esp + 4], edi
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
sub esp, 0x14
mov dword [esp], edi
mov edi, dword [ebp - 0x4c]
call edi
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call edi
jmp 0x402de7
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov edi, dword [ebp - 0x4c]
call edi
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call edi
mov dword [esp], 0x202
mov eax, dword [ebp - 0x58]
call eax
mov ebx, eax
mov eax, dword [ebp - 0x54]
cmp word [eax], 0
je 0x403374
lea esi, cs:[esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4031f0
mov ecx, dword [ebp - 0x54]
sub eax, ecx
sar eax, 1
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
xor esi, esi
or eax, 0x20019
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x101
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x4032b8
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x28]
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x54]
mov dword [esp], edx
call sym._build_subkey_path
lea edx, [ebp - 0x10]
mov dword [esp + 0x10], edx
mov edx, dword [ebp - 0x24]
mov edi, eax
mov dword [esp + 8], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x4032d0
mov dword [esp], edi
add esi, 1
mov eax, dword [ebp - 0x4c]
call eax
jmp 0x403210
mov dword [esp], ebx
mov eax, dword [ebp - 0x4c]
call eax
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 8]
mov ecx, edi
mov dword [esp], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x38]
call sym._export_registry_data
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x4032a5
mov dword [esp], 0x1e
mov eax, dword [ebp - 0x58]
call eax
mov edi, eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
mov dword [esp + 8], str.dword:_08x
mov dword [esp + 4], 0xf
mov dword [esp + 0xc], eax
mov dword [esp], edi
call sym._swprintf
cmp word [edi], 0
jne 0x402fe0
xor eax, eax
jmp 0x402ff3
xor eax, eax
jmp 0x402f13
xor eax, eax
jmp 0x4030eb
xor eax, eax
jmp 0x40317b
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], 0xe
mov dword [ebp - 0x58], eax
call eax
mov ecx, dword [ebp - 0x54]
mov ebx, eax
mov eax, 7
jmp 0x402c4b
xor eax, eax
jmp 0x402c7b
mov dword [ebp - 0x28], 0
jmp 0x403203