Function at 0x402f70
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags
Set registry value

Disassembly:
push ebp
mov ecx, 0x2001b
mov ebp, esp
push edi
push esi
push ebx
xor ebx, ebx
lea eax, [ebp - 0x34]
sub esp, 0x6c
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._RegOpenKeyExW_20
mov dword [ebp - 0x44], eax
sub esp, 0x14
test eax, eax
jne 0x4032d0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x34]
test eax, eax
mov eax, 0x416e40
cmovne eax, dword [ebp + 0x14]
mov dword [0x41600c], eax
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp + 8]
call sym._read_value
mov dword [0x416008], eax
test eax, eax
je 0x403287
mov edx, dword [ebp - 0x38]
lea ecx, [edx - 1]
cmp ecx, 1
jbe 0x403400
cmp edx, 4
je 0x403220
cmp edx, 7
mov ecx, dword [ebp - 0x30]
jne 0x403300
cmp ecx, 1
jle 0x403039
lea ebx, [eax + ecx*2 - 2]
xor edx, edx
lea esi, [esi]
cmp word [eax], 0
jne 0x403030
movzx esi, word [eax + 2]
cmp esi, 1
sbb edx, 0xffffffff
add eax, 2
cmp eax, ebx
jne 0x403020
add ecx, edx
add ecx, ecx
mov dword [esp], ecx
call sym._heap_xalloc
mov esi, dword [0x416008]
cmp dword [ebp - 0x30], 1
mov edi, eax
jle 0x4035b8
mov dword [ebp - 0x40], 0
xor eax, eax
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x3c], edi
jmp 0x40309e
cmp word [edi + eax*2 + 2], 0
je 0x4030bf
mov word [esi], 0xd
mov edi, dword [ebp - 0x3c]
inc eax
mov esi, dword [ebp - 0x48]
add dword [ebp - 0x40], 2
lea ebx, [edi + edx + 2]
mov word [esi], 0xa
mov dword [ebp - 0x48], ebx
mov ebx, dword [ebp - 0x30]
lea edx, [ebx - 1]
cmp edx, eax
jle 0x4030d0
mov ecx, dword [ebp - 0x40]
mov edi, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x3c]
inc ecx
lea edx, [ecx + ecx]
movzx ebx, word [edi + eax*2]
add esi, edx
mov dword [ebp - 0x48], esi
mov esi, dword [ebp - 0x3c]
test ebx, ebx
lea esi, [esi + edx - 2]
je 0x403070
mov word [esi], bx
inc eax
mov dword [ebp - 0x40], ecx
mov ebx, dword [ebp - 0x30]
lea edx, [ebx - 1]
cmp edx, eax
jg 0x40309e
mov esi, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x3c]
lea eax, [esi + eax*2]
movzx eax, word [eax]
mov ebx, dword [ebp - 0x48]
mov word [ebx], ax
xor ebx, ebx
mov dword [esp + 8], esi
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], ebx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, sym._modify_dlgproc_16
mov dword [0x416008], edi
xor edi, edi
sub esp, 0xc
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], edi
mov dword [esp], 0
mov dword [esp + 8], eax
mov eax, 0x7d9
mov dword [esp + 4], eax
call sym._DialogBoxParamW_20
sub esp, 0x14
dec eax
jne 0x4033f2
mov edx, dword [0x416008]
cmp word [edx], 0
je 0x4035dc
mov eax, edx
lea esi, [esi]
lea edi, [edi]
add eax, 2
cmp word [eax], 0
jne 0x403160
sub eax, edx
mov edx, eax
add eax, 4
sar edx, 1
mov dword [esp], eax
mov dword [ebp - 0x30], edx
call sym._heap_xalloc
cmp dword [ebp - 0x30], 1
mov ebx, eax
mov eax, dword [0x416008]
mov dword [ebp - 0x48], eax
jle 0x4035c2
mov dword [ebp - 0x54], esi
xor edi, edi
xor eax, eax
jmp 0x4031bf
mov ecx, dword [ebp - 0x40]
lea edi, [ebx + edx]
mov word [edi], cx
mov edi, dword [ebp - 0x3c]
lea ecx, [ebx + edx + 4]
mov esi, dword [ebp - 0x30]
inc eax
lea edx, [esi - 1]
cmp edx, eax
jle 0x403448
mov ecx, dword [ebp - 0x48]
lea edx, [edi + edi]
lea esi, [ebx + edx]
mov dword [ebp - 0x50], esi
lea esi, [edi + 1]
mov dword [ebp - 0x3c], esi
lea esi, [ebx + edx + 2]
mov dword [ebp - 0x4c], esi
movzx ecx, word [ecx + eax*2]
mov dword [ebp - 0x40], ecx
cmp ecx, 0xd
jne 0x4031a0
mov esi, dword [ebp - 0x48]
lea ecx, [eax + eax]
cmp word [esi + ecx + 2], 0xa
jne 0x4031a0
cmp word [ebx + edx - 2], 0
lea esi, [ebx + edx + 2]
mov ecx, esi
je 0x403212
mov dword [ebp - 0x50], esi
lea edi, [ebx + edx]
mov word [edi], 0
mov edi, dword [ebp - 0x3c]
lea ecx, [ebx + edx + 4]
mov edx, dword [ebp - 0x50]
inc eax
mov dword [ebp - 0x4c], edx
jmp 0x4031b0
mov edx, 0x40
mov ebx, dword [eax]
mov esi, sym._modify_dlgproc_16
mov dword [esp + 4], edx
mov edi, 0x8052
mov dword [esp], eax
call sym._heap_xrealloc
mov ecx, 0x412206
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [0x416008], eax
call sym._wsprintfW
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov dword [esp], 0
call sym._DialogBoxParamW_20
sub esp, 0x14
dec eax
mov eax, dword [0x416008]
je 0x403550
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x34]
xor edx, edx
mov dword [0x416008], edx
sub esp, 0xc
mov dword [esp], eax
call sym._RegCloseKey_4
mov eax, dword [ebp - 0x44]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 8]
mov edx, 0x7da
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._error_code_messagebox
mov dword [ebp - 0x44], 0
mov eax, dword [ebp - 0x44]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x34]
lea eax, [ebp - 0x2c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov esi, 0x7d3
mov dword [esp + 4], esi
mov edi, dword [ebp + 0x14]
mov dword [esp], 0
mov dword [ebp - 0x2c], ebx
mov ebx, sym._bin_modify_dlgproc_16
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x1c], ecx
call sym._DialogBoxParamW_20
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x44], eax
sub esp, 0x14
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x4033f2
mov eax, dword [0x416e20]
mov ecx, 3
mov ebx, 0xffffffff
mov dword [esp + 0xc], ecx
mov edi, 0x100c
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov eax, dword [eax + 8]
mov dword [esp], eax
call sym._SendMessageW_16
mov edx, dword [0x416008]
sub esp, 0x10
mov ebx, eax
mov dword [esp + 8], edx
xor edx, edx
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp + 0x14]
sub esp, 0xc
mov dword [esp + 4], eax
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp + 8]
call sym._read_value
mov edx, dword [ebp - 0x30]
mov dword [esp + 4], ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [0x416008], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], eax
mov eax, dword [0x416e20]
mov eax, dword [eax + 8]
mov dword [esp], eax
call sym._format_value_data
mov eax, dword [0x416008]
jmp 0x40328d
mov dword [esp], 0
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, sym._modify_dlgproc_16
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov eax, 0x7d0
mov dword [esp + 4], eax
call sym._DialogBoxParamW_20
sub esp, 0x14
dec eax
je 0x4034d8
mov eax, dword [0x416008]
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
jmp 0x40328d
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x54]
lea edx, [ecx + eax*2]
lea eax, [edi + edi + 4]
lea edi, [eax + 2]
movzx edx, word [edx]
mov ecx, dword [ebp - 0x4c]
mov word [ecx], dx
mov ecx, dword [ebp - 0x3c]
xor edx, edx
mov word [ecx], 0
mov ecx, dword [ebp - 0x48]
mov word [ebx + eax], 0
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x38]
xor ecx, ecx
mov dword [0x416008], ebx
sub esp, 0xc
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._RegSetValueExW_24
sub esp, 0x18
test eax, eax
jne 0x403532
mov dword [ebp - 0x44], 1
jmp 0x403358
mov edx, dword [0x416008]
cmp word [edx], 0
je 0x40363f
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4034f0
sub eax, edx
add eax, 2
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._RegSetValueExW_24
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0x18
test eax, eax
je 0x4034c7
mov eax, dword [ebp + 8]
mov edi, 0x7da
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._error_code_messagebox
mov eax, dword [0x416008]
jmp 0x40328d
mov dword [esp], eax
lea edi, [ebp - 0x2c]
call sym._GetMultiByteString
mov edx, 0x412210
mov dword [esp + 8], edi
mov esi, eax
mov eax, dword [0x416004]
mov dword [esp], esi
test eax, eax
mov eax, 0x41220c
cmove eax, edx
mov dword [esp + 4], eax
call sym._sscanf
test eax, eax
mov ebx, eax
jne 0x4035e8
mov dword [esp + 8], esi
xor edx, edx
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov dword [ebp - 0x44], ebx
sub esp, 0xc
jmp 0x40334d
mov dword [ebp - 0x48], eax
mov eax, esi
jmp 0x4030d9
mov dword [ebp - 0x4c], ebx
lea edi, [ebx + 2]
mov edx, eax
mov dword [ebp - 0x3c], edi
mov eax, 4
mov edi, 6
jmp 0x40345b
xor edx, edx
mov eax, 4
jmp 0x403172
mov dword [esp + 0x10], edi
mov eax, dword [ebp - 0x38]
mov ebx, 4
mov dword [esp + 0x14], ebx
xor edi, edi
mov ebx, 1
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._RegSetValueExW_24
sub esp, 0x18
test eax, eax
je 0x403587
mov eax, dword [ebp + 8]
mov ecx, 0x7da
xor ebx, ebx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._error_code_messagebox
jmp 0x403587
mov eax, 2
jmp 0x4034fe