Function at 0x403f32
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb18
push esi
push edi
push str.ControllerSetConfig___entry
call fcn.00409a98
add esp, 4
cmp dword [ebp + 8], 0
jne 0x403f57
xor eax, eax
jmp 0x40437e
cmp dword [ebp + 0xc], 0
jne 0x403f64
xor eax, eax
jmp 0x40437e
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x4c
add eax, 0x10
mov dword [ebp - 0x5c8], eax
mov dword [ebp - 0x5c4], 0x120003
mov dword [ebp - 0xb00], 0
jmp 0x403f98
mov ecx, dword [ebp - 0xb00]
add ecx, 1
mov dword [ebp - 0xb00], ecx
mov edx, dword [ebp - 0xb00]
cmp edx, dword [ebp + 0x10]
jae 0x403fc8
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0xb00]
imul eax, eax, 0x4c
lea edi, [ebp + eax - 0x5b8]
mov ecx, 0x13
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0xc]
add ecx, 0x4c
mov dword [ebp + 0xc], ecx
jmp 0x403f89
push 0
push 0
lea edx, [ebp - 0x5c8]
push edx
mov eax, dword [ebp + 0x10]
imul eax, eax, 0x4c
add eax, 0x10
push eax
push 0x7306
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.GDI32.dll_ExtEscape]
test eax, eax
je 0x404004
push str.FAILURE:_Failed_the_excape_call_for_CWDDEDI_ControllerGetConfig.
call fcn.00409a98
add esp, 4
xor eax, eax
jmp 0x40437e
lea edx, [ebp - 0xafc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00403e36
add esp, 8
cmp eax, 1
je 0x404030
push str.FAILURE:_Failed_for_AdapterGetSavedPath
call fcn.00409a98
add esp, 4
xor eax, eax
jmp 0x40437e
push 0
push 0x110005
lea ecx, [ebp - 0x5ec]
push ecx
call fcn.00404ee8
add esp, 0xc
mov dword [ebp - 0x50c], 0x508
mov dword [ebp - 4], 0
mov dword [ebp - 0x5dc], 0xc
mov dword [ebp - 0x5d4], 0
lea edx, [ebp - 0x520]
mov dword [ebp - 0x5d8], edx
mov dword [ebp - 0x5f4], 0
mov dword [ebp - 0xb0c], 0
mov byte [ebp - 0x5d0], 0
mov byte [ebp - 0x5cf], 0
mov byte [ebp - 0x5ce], 0
mov byte [ebp - 0x5cd], 0
mov byte [ebp - 0x5cc], 0
mov byte [ebp - 0x5cb], 5
mov byte [ebp - 0xb08], 0
mov byte [ebp - 0xb07], 0
mov byte [ebp - 0xb06], 0
mov byte [ebp - 0xb05], 0
mov byte [ebp - 0xb04], 0
mov byte [ebp - 0xb03], 1
mov dword [ebp - 0x5f0], 1
lea eax, [ebp - 0x50c]
push eax
push 0x508
lea ecx, [ebp - 0x5ec]
push ecx
push 0x10
push 0x7306
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.GDI32.dll_ExtEscape]
test eax, eax
jne 0x40430a
push str.CWDDEDI_AdapterFlushSaveData_OK
call fcn.00409a98
add esp, 4
cmp dword [0x417ae8], 2
jne 0x4041ff
lea eax, [ebp - 0x5f4]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea ecx, [ebp - 0x5d0]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x404178
push str.FAILURE:_AllocateAndInitializeSid_Admin_failed
call fcn.00409a98
add esp, 4
mov dword [ebp - 0x5f0], 0
jmp 0x40437c
lea edx, [ebp - 0xb0c]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 1
lea eax, [ebp - 0xb08]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x4041be
push str.FAILURE:_AllocateAndInitializeSid_everyone_failed
call fcn.00409a98
add esp, 4
mov dword [ebp - 0x5f0], 0
jmp 0x40437a
cmp dword [ebp - 4], 0
jne 0x4041ff
mov eax, 0x400
call fcn.0040c070
mov dword [ebp - 0xb18], esp
mov ecx, dword [ebp - 0xb18]
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
jne 0x4041ff
push str.FAILURE:_Failed_to_allocate_pAcl.
call fcn.00409a98
add esp, 4
mov dword [ebp - 0x5f0], 0
jmp 0x404378
mov edx, dword [ebp - 0xb0c]
push edx
mov eax, dword [ebp - 0x5f4]
push eax
mov ecx, dword [ebp - 4]
push ecx
lea edx, [ebp - 0x520]
push edx
call fcn.004049bc
add esp, 0x10
test eax, eax
jne 0x404240
push str.FAILURE:_Failed_to_set_registry_access__
call fcn.00409a98
add esp, 4
mov dword [ebp - 0x5f0], 0
jmp 0x404376
lea eax, [ebp - 0xb10]
push eax
lea ecx, [ebp - 0xb14]
push ecx
lea edx, [ebp - 0x5dc]
push edx
push 0xf003f
push 0
push str.Application_Global_Data
push 0
lea eax, [ebp - 0xaf8]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x404295
push str.FAILURE:_Failed_to_open_or_create_exist_ATISavedPath__
call fcn.00409a98
add esp, 4
mov dword [ebp - 0x5f0], 0
jmp 0x404374
mov ecx, dword [ebp - 0x408]
push ecx
lea edx, [ebp - 0x404]
push edx
push 3
push 0
lea eax, [ebp - 0x508]
push eax
mov ecx, dword [ebp - 0xb14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x4042db
push str.FAILURE:_Failed_to_set_the_value_for_ATISavedPath__
call fcn.00409a98
add esp, 4
mov dword [ebp - 0x5f0], 0
jmp 0x404372
mov edx, dword [ebp - 0xb14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x404305
push str.FAILURE:_Failed_to_close_key__
call fcn.00409a98
add esp, 4
mov dword [ebp - 0x5f0], 0
jmp 0x404370
jmp 0x4040e9
cmp dword [ebp - 0x5f4], 0
je 0x404320
mov eax, dword [ebp - 0x5f4]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0xb0c], 0
je 0x404336
mov ecx, dword [ebp - 0xb0c]
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x5f0], 0
je 0x40434e
push str.ControllerSetConfig___pass
call fcn.00409a98
add esp, 4
jmp 0x40435b
push str.FAILURE:_ControllerSetConfig_failed
call fcn.00409a98
add esp, 4
push str.ControllerSetConfig___exit
call fcn.00409a98
add esp, 4
mov eax, dword [ebp - 0x5f0]
jmp 0x40437e
jmp 0x40430a
jmp 0x40430a
jmp 0x40430a
jmp 0x40430a
jmp 0x40430a
jmp 0x40430a
jmp 0x40430a
lea esp, [ebp - 0xb20]
pop edi
pop esi
mov esp, ebp
pop ebp
ret