Function at 0x401e10
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, 0x8c
cmp word [ecx], 0
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x6c], ecx
je 0x4025cf
mov eax, ecx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x401e38
mov edi, dword [ebp - 0x6c]
mov ecx, dword [sym.imp.ucrtbase.dll_malloc]
sub eax, edi
mov dword [ebp - 0x70], 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 0x401e60
sub eax, dword [ebp - 0x6c]
sar eax, 1
add eax, 7
mov edi, dword [ebp - 0x6c]
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 0x4025ec
mov eax, ebx
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x401ea0
sub eax, ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
lea edi, [ebp - 0x1c]
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 - 0x58], eax
call eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
sub esp, 0x14
mov dword [ebp - 0x64], eax
mov dword [esp], ebx
call eax
mov edi, dword [ebp - 0x70]
mov dword [esp], 0x200
call edi
mov dword [esp], 0x800
mov dword [ebp - 0x3c], eax
call edi
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], 0x800
mov dword [ebp - 0x48], 0x100
lea esi, [esi]
mov eax, dword [ebp - 0x48]
mov dword [esp + 0x10], 0
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
test eax, eax
je 0x401fa0
cmp eax, 0xea
jne 0x402438
mov ebx, dword [ebp - 0x28]
cmp ebx, dword [ebp - 0x44]
jbe 0x4022e0
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], eax
jmp 0x401f18
mov ecx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x28]
mov edx, 0x3d
mov eax, 0x409124
mov ebx, dword [ebp - 0x24]
test ecx, ecx
je 0x401fcc
cmp word [ecx], 0
je 0x401fcc
jmp 0x402398
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x401fc8
sub eax, 0x409124
mov edx, 0x3d
sar eax, 1
mov dword [ebp - 0x20], eax
mov eax, 0x409124
jmp 0x401ff4
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x401ff0
sub eax, 0x409124
lea esi, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], esi
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 4], 0x409124
call eax
sub esp, 0x14
mov esi, dword [ebp - 0x20]
cmp ebx, 1
je 0x4021f0
cmp ebx, 4
je 0x402308
cmp ebx, 3
jne 0x402310
mov eax, 0x65
mov edx, 0x40912a
jmp 0x40205c
movzx eax, word [edx + 2]
add edx, 2
test ax, ax
jne 0x402058
sub edx, 0x40912a
mov eax, 0x40912a
mov ebx, edx
mov edx, 0x65
sar ebx, 1
jmp 0x402084
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x402080
sub eax, 0x40912a
lea ecx, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 4], 0x40912a
call eax
sub esp, 0x14
test edi, edi
je 0x402288
lea eax, [edi + edi*2]
lea edx, [esi + ebx]
add eax, eax
mov dword [ebp - 0x54], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x70]
call eax
mov edx, dword [ebp - 0x54]
mov ebx, eax
mov eax, dword [ebp - 0x40]
lea ecx, [eax + edi - 1]
add edi, eax
mov esi, eax
mov dword [ebp - 0x68], edi
xor edi, edi
mov dword [ebp - 0x60], ecx
mov ecx, edi
mov edi, edx
jmp 0x402102
inc esi
cmp dword [ebp - 0x68], esi
je 0x40223c
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 - 0x54], ecx
call sym._swprintf
mov ecx, dword [ebp - 0x54]
add eax, ecx
cmp dword [ebp - 0x60], esi
je 0x40223c
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 0x4020f8
cmp word [ebx], 0
je 0x4025ba
mov eax, ebx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402160
sub eax, ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
lea edi, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 0xc], edi
mov dword [esp + 4], ebx
call eax
mov edx, 0xd
mov eax, str._r_n
sub esp, 0x14
jmp 0x4021a4
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x4021a0
sub eax, str._r_n
lea edi, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], edi
mov edi, 2
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 4], str._r_n
call eax
xor ecx, ecx
sub esp, 0x14
jmp 0x4020f8
mov eax, edi
lea ecx, [ebp - 0x1c]
shr eax, 1
dec eax
test edi, edi
cmovne edi, eax
mov eax, dword [ebp - 0x40]
mov edx, edi
call sym._escape_string
mov esi, eax
mov eax, dword [ebp - 0x1c]
lea edi, [eax + 3]
lea eax, [edi + edi]
mov dword [esp], eax
mov eax, dword [ebp - 0x70]
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 - 0x64]
call eax
cmp word [ebx], 0
mov eax, ebx
je 0x4025b3
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x402250
sub eax, ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
lea esi, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 0xc], esi
mov dword [esp + 4], ebx
call eax
mov eax, dword [ebp - 0x64]
sub esp, 0x14
mov dword [esp], ebx
call eax
mov edx, 0xa
mov eax, 0x409140
jmp 0x40229c
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x402298
sub eax, 0x409140
lea edi, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], edi
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 4], 0x409140
call eax
inc dword [ebp - 0x5c]
sub esp, 0x14
jmp 0x401f18
mov eax, dword [ebp - 0x48]
lea ebx, [eax + eax]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x3c], eax
jmp 0x401f18
test edi, edi
jne 0x402578
mov dword [esp], 0x1e
mov eax, dword [ebp - 0x70]
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 - 0x54], eax
call sym._swprintf
mov edx, dword [ebp - 0x54]
mov ebx, eax
cmp word [edx], 0
je 0x4025c1
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402350
sub eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x54], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 0x10], 0
call eax
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x64]
sub esp, 0x14
mov dword [esp], edx
call eax
jmp 0x4020ba
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x3c]
lea ecx, [ebp - 0x20]
call sym._escape_string
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x54], eax
lea edx, [esi + 4]
mov esi, dword [ebp - 0x70]
lea eax, [edx + edx]
mov dword [ebp - 0x60], edx
mov dword [esp], eax
call esi
mov edx, dword [ebp - 0x60]
mov dword [esp + 8], 0x409158
mov esi, eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 4], edx
mov dword [esp + 0xc], eax
mov dword [esp], esi
call sym._swprintf
cmp word [esi], 0
mov dword [ebp - 0x20], eax
je 0x4025c8
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4023f0
sub eax, esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
lea ecx, [ebp - 0x1c]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], esi
mov dword [esp], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 0x10], 0
call eax
sub esp, 0x14
mov dword [esp], esi
mov esi, dword [ebp - 0x64]
call esi
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call esi
jmp 0x40202a
mov eax, dword [ebp - 0x40]
mov esi, dword [ebp - 0x64]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call esi
mov dword [esp], 0x202
mov eax, dword [ebp - 0x70]
call eax
mov ebx, eax
mov eax, dword [ebp - 0x6c]
cmp word [eax], 0
je 0x4025f3
lea esi, [esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402470
sub eax, dword [ebp - 0x6c]
sar eax, 1
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
xor edi, edi
or eax, 0x20019
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x101
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x50]
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 0x402560
mov ecx, dword [ebp - 0x40]
mov esi, dword [ebp - 0x6c]
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], ecx
mov dword [esp], esi
mov dword [esp + 0xc], eax
call sym._build_subkey_path
lea ecx, [ebp - 0x1c]
mov dword [esp + 4], ebx
mov dword [esp + 0x10], ecx
mov esi, eax
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x50]
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 0x402538
mov dword [esp], esi
mov eax, dword [ebp - 0x64]
inc edi
call eax
jmp 0x40248e
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
mov ecx, esi
mov dword [esp], eax
mov eax, dword [ebp - 0x4c]
call sym._export_registry_data
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x402527
mov dword [esp], ebx
mov eax, dword [ebp - 0x64]
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 - 0x70]
call eax
mov ebx, eax
mov eax, dword [ebp - 0x40]
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 0x402250
xor eax, eax
jmp 0x40225b
xor eax, eax
jmp 0x40216b
xor eax, eax
jmp 0x40235b
xor eax, eax
jmp 0x4023fb
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], 0xe
mov dword [ebp - 0x70], eax
call eax
mov ebx, eax
mov eax, 7
jmp 0x401e71
xor eax, eax
jmp 0x401eab
mov dword [ebp - 0x40], 0
jmp 0x402481