Function at 0x401e00
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 - 0x34], eax
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x54], ecx
je 0x4025af
mov eax, ecx
nop
add eax, 2
cmp word [eax], 0
jne 0x401e20
mov edi, dword [ebp - 0x54]
mov ecx, dword [sym.imp.ucrtbase.dll_malloc]
sub eax, edi
mov dword [ebp - 0x58], ecx
add eax, 0xe
mov dword [esp], eax
call ecx
mov ebx, eax
mov eax, edi
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x401e48
sub eax, dword [ebp - 0x54]
sar eax, 1
add eax, 7
mov edi, dword [ebp - 0x54]
mov dword [esp + 8], str._r_n__s__r_n
mov dword [esp + 4], eax
mov dword [esp + 0xc], edi
mov dword [esp], ebx
call sym._swprintf
cmp word [ebx], 0
je 0x4025cc
mov eax, ebx
add eax, 2
cmp word [eax], 0
jne 0x401e80
sub eax, ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
lea edi, [ebp - 0x10]
mov dword [esp + 0xc], edi
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [esp + 0x10], 0
mov dword [esp + 4], ebx
mov dword [ebp - 0x40], eax
call eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
sub esp, 0x14
mov dword [ebp - 0x4c], eax
mov dword [esp], ebx
call eax
mov edi, dword [ebp - 0x58]
mov dword [esp], 0x200
call edi
mov dword [esp], 0x800
mov dword [ebp - 0x24], eax
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 [esp + 0x10], 0
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 + 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 - 0x38]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
test eax, eax
je 0x401f80
cmp eax, 0xea
jne 0x402418
mov ebx, dword [ebp - 0x1c]
cmp ebx, dword [ebp - 0x2c]
jbe 0x4022c0
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], eax
jmp 0x401ef8
mov ecx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x1c]
mov edx, 0x3d
mov eax, 0x409124
mov ebx, dword [ebp - 0x18]
test ecx, ecx
je 0x401fac
cmp word [ecx], 0
je 0x401fac
jmp 0x402378
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x401fa8
sub eax, 0x409124
mov edx, 0x3d
sar eax, 1
mov dword [ebp - 0x14], eax
mov eax, 0x409124
jmp 0x401fd4
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x401fd0
sub eax, 0x409124
lea esi, [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], esi
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], 0x409124
call eax
sub esp, 0x14
mov esi, dword [ebp - 0x14]
cmp ebx, 1
je 0x4021d0
cmp ebx, 4
je 0x4022e8
cmp ebx, 3
jne 0x4022f0
mov eax, 0x65
mov edx, 0x40912a
jmp 0x40203c
movzx eax, word [edx + 2]
add edx, 2
test ax, ax
jne 0x402038
sub edx, 0x40912a
mov eax, 0x40912a
mov ebx, edx
mov edx, 0x65
sar ebx, 1
jmp 0x402064
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x402060
sub eax, 0x40912a
lea ecx, [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], 0x40912a
call eax
sub esp, 0x14
test edi, edi
je 0x402268
lea eax, [edi + edi*2]
lea edx, [esi + ebx]
add eax, eax
mov dword [ebp - 0x3c], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
call eax
mov edx, dword [ebp - 0x3c]
mov ebx, eax
mov eax, dword [ebp - 0x28]
lea ecx, [eax + edi - 1]
add edi, eax
mov esi, eax
mov dword [ebp - 0x50], edi
xor edi, edi
mov dword [ebp - 0x48], ecx
mov ecx, edi
mov edi, edx
jmp 0x4020e2
inc esi
cmp dword [ebp - 0x50], esi
je 0x40221c
movzx eax, byte [esi]
mov dword [esp + 8], str._02x
mov dword [esp + 4], 3
mov dword [esp + 0xc], eax
lea eax, [ebx + ecx*2]
mov dword [esp], eax
mov dword [ebp - 0x3c], ecx
call sym._swprintf
mov ecx, dword [ebp - 0x3c]
add eax, ecx
cmp dword [ebp - 0x48], esi
je 0x40221c
mov edx, 0x2c
add edi, 3
lea ecx, [eax + 1]
mov word [ebx + eax*2], dx
xor edx, edx
mov word [ebx + eax*2 + 2], dx
cmp edi, 0x4c
jbe 0x4020d8
cmp word [ebx], 0
je 0x40259a
mov eax, ebx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402140
sub eax, ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
lea edi, [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], edi
mov dword [esp + 4], ebx
call eax
mov edx, 0xd
mov eax, str._r_n
sub esp, 0x14
jmp 0x402184
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x402180
sub eax, str._r_n
lea edi, [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], edi
mov edi, 2
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], str._r_n
call eax
xor ecx, ecx
sub esp, 0x14
jmp 0x4020d8
mov eax, edi
lea ecx, [ebp - 0x10]
shr eax, 1
dec eax
test edi, edi
cmovne edi, eax
mov eax, dword [ebp - 0x28]
mov edx, edi
call sym._escape_string
mov esi, eax
mov eax, dword [ebp - 0x10]
lea edi, [eax + 3]
lea eax, [edi + edi]
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
call eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x409164
mov ebx, eax
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._swprintf
mov dword [esp], esi
mov eax, dword [ebp - 0x4c]
call eax
cmp word [ebx], 0
mov eax, ebx
je 0x402593
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x402230
sub eax, ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
lea esi, [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 0xc], esi
mov dword [esp + 4], ebx
call eax
mov eax, dword [ebp - 0x4c]
sub esp, 0x14
mov dword [esp], ebx
call eax
mov edx, 0xa
mov eax, 0x409140
jmp 0x40227c
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x402278
sub eax, 0x409140
lea edi, [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0xc], edi
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], 0x409140
call eax
inc dword [ebp - 0x44]
sub esp, 0x14
jmp 0x401ef8
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 0x401ef8
test edi, edi
jne 0x402558
mov dword [esp], 0x1e
mov eax, dword [ebp - 0x58]
call eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str.hex__x_:
mov dword [esp + 4], 0xf
mov dword [esp], eax
mov dword [ebp - 0x3c], eax
call sym._swprintf
mov edx, dword [ebp - 0x3c]
mov ebx, eax
cmp word [edx], 0
je 0x4025a1
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402330
sub eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x3c], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x10], 0
call eax
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x4c]
sub esp, 0x14
mov dword [esp], edx
call eax
jmp 0x40209a
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x14]
call sym._escape_string
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
lea edx, [esi + 4]
mov esi, dword [ebp - 0x58]
lea eax, [edx + edx]
mov dword [ebp - 0x48], edx
mov dword [esp], eax
call esi
mov edx, dword [ebp - 0x48]
mov dword [esp + 8], 0x409158
mov esi, eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], edx
mov dword [esp + 0xc], eax
mov dword [esp], esi
call sym._swprintf
cmp word [esi], 0
mov dword [ebp - 0x14], eax
je 0x4025a8
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4023d0
sub eax, esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x10]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], esi
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x10], 0
call eax
sub esp, 0x14
mov dword [esp], esi
mov esi, dword [ebp - 0x4c]
call esi
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call esi
jmp 0x40200a
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x4c]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call esi
mov dword [esp], 0x202
mov eax, dword [ebp - 0x58]
call eax
mov ebx, eax
mov eax, dword [ebp - 0x54]
cmp word [eax], 0
je 0x4025d3
lea esi, [esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402450
sub eax, dword [ebp - 0x54]
sar eax, 1
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
xor edi, edi
or eax, 0x20019
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x101
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x402540
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x54]
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], ecx
mov dword [esp], esi
mov dword [esp + 0xc], eax
call sym._build_subkey_path
lea ecx, [ebp - 0x10]
mov dword [esp + 4], ebx
mov dword [esp + 0x10], ecx
mov esi, eax
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], 0
mov dword [esp + 0xc], ecx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x402518
mov dword [esp], esi
mov eax, dword [ebp - 0x4c]
inc edi
call eax
jmp 0x40246e
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
mov ecx, esi
mov dword [esp], eax
mov eax, dword [ebp - 0x34]
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 0x402507
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 dword [esp], 0x1e
mov eax, dword [ebp - 0x58]
call eax
mov ebx, 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], ebx
call sym._swprintf
cmp word [ebx], 0
mov eax, ebx
jne 0x402230
xor eax, eax
jmp 0x40223b
xor eax, eax
jmp 0x40214b
xor eax, eax
jmp 0x40233b
xor eax, eax
jmp 0x4023db
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], 0xe
mov dword [ebp - 0x58], eax
call eax
mov ebx, eax
mov eax, 7
jmp 0x401e59
xor eax, eax
jmp 0x401e8b
mov dword [ebp - 0x28], 0
jmp 0x402461