Function at 0x40c020
Capabilities:
Get common file path
Query or enumerate registry value
Read .ini file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a637b
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1090
call fcn.0057ab90
mov eax, dword [0x632a40]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x1098], esi
push 0x208
lea eax, [ebp - 0x838]
push 0
push eax
call fcn.0057ff70
add esp, 0xc
lea eax, [ebp - 0xa40]
push 0x208
push 0
push eax
call fcn.0057ff70
add esp, 0xc
lea eax, [ebp - 0xc48]
push 0x208
push 0
push eax
call fcn.0057ff70
add esp, 0xc
lea eax, [ebp - 0x428]
push 0x208
push 0
push eax
call fcn.0057ff70
add esp, 0xc
lea eax, [ebp - 0x220]
push 0x208
push 0
push eax
call fcn.0057ff70
add esp, 0xc
lea eax, [ebp - 0x1058]
push 0x208
push 0
push eax
call fcn.0057ff70
add esp, 0xc
lea eax, [ebp - 0xe4e]
push 0x206
push 0
push eax
call fcn.0057ff70
movups xmm0, xmmword [0x623bcc]
mov eax, dword [0x623bdc]
lea ecx, [ebp - 0xe50]
add esp, 0xc
mov dword [ebp - 0xe40], eax
movups xmmword [ebp - 0xe50], xmm0
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40c130
mov eax, dword [0x623ac8]
mov dword [ecx], eax
mov eax, dword [0x623acc]
mov dword [ecx + 4], eax
mov eax, dword [0x623ad0]
mov dword [ecx + 8], eax
mov eax, dword [0x623ad4]
mov dword [ecx + 0xc], eax
lea eax, [ebp - 0x109c]
push eax
push 0x20019
push 0
lea eax, [ebp - 0xe50]
push eax
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40c2ff
lea eax, [ebp - 0x10a0]
mov dword [ebp - 0x10a0], 0x208
push eax
lea eax, [ebp - 0x1058]
push eax
push 0
push 0
push str.InstallPath
push dword [ebp - 0x109c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40c2ff
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x1058]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x42a], ax
test ax, ax
jne 0x40c1c0
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x428]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40c1e0
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x40c2ff
lea eax, [ebp - 0x107c]
mov dword [ebp - 0x105c], 0
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x220]
push 0
push eax
movups xmmword [ebp - 0x107c], xmm0
movups xmmword [ebp - 0x106c], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
setne al
test al, al
je 0x40c2ff
push 0x208
lea eax, [ebp - 0x630]
push 0
push eax
call fcn.0057ff70
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x220]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x632], ax
test ax, ax
jne 0x40c263
lea ecx, [ebp - 0x630]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40c284
mov eax, dword [str.GDeZip.exe]
mov dword [ecx], eax
mov eax, dword [0x623bfc]
mov dword [ecx + 4], eax
mov eax, dword [0x623c00]
mov dword [ecx + 8], eax
mov eax, dword [0x623c04]
mov dword [ecx + 0xc], eax
mov eax, dword [0x623c08]
mov dword [ecx + 0x10], eax
mov ax, word [0x623c0c]
mov word [ecx + 0x14], ax
lea ecx, [ebp - 0x630]
call fcn.00419480
test al, al
je 0x40c2ff
push dword [ebp - 0x109c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x428]
push eax
lea ecx, [esi + 0x44]
call fcn.004049c0
lea eax, [ebp - 0x220]
push eax
lea ecx, [esi + 0x74]
call fcn.004049c0
jmp 0x40ca2d
push dword [ebp - 0x109c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0x2b
lea eax, [ebp - 0x838]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x838]
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x40c330
mov eax, dword [0x623ae4]
lea edx, [ebp - 0x838]
mov dword [edi], eax
add edx, 0xfffffffe
nop dword [eax]
mov cx, word [edx + 2]
lea edx, [edx + 2]
test cx, cx
jne 0x40c350
mov esi, dword [0x623ac8]
lea edi, [ebp - 0x838]
mov ecx, dword [0x623acc]
add edi, 0xfffffffe
mov dword [edx], esi
mov dword [edx + 4], ecx
mov ecx, dword [0x623ad0]
mov dword [edx + 8], ecx
mov ecx, dword [0x623ad4]
mov dword [edx + 0xc], ecx
nop dword [eax + eax]
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x40c390
lea ecx, [ebp - 0x838]
mov dword [edi], eax
add ecx, 0xfffffffe
nop word [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40c3b0
mov eax, dword [0x623acc]
mov dword [ecx], esi
mov dword [ecx + 4], eax
mov eax, dword [0x623ad0]
mov dword [ecx + 8], eax
mov eax, dword [0x623ad4]
mov dword [ecx + 0xc], eax
lea ecx, [ebp - 0x838]
add ecx, 0xfffffffe
nop
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40c3e0
mov eax, dword [0x623ae8]
mov dword [ecx], eax
mov eax, dword [0x623aec]
mov dword [ecx + 4], eax
mov ax, word [0x623af0]
mov word [ecx + 8], ax
lea eax, [ebp - 0x838]
push eax
push 0x104
lea eax, [ebp - 0xa40]
push eax
push 0x623880
push str.InstallPath
push str.GDGlobalCfg
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor ecx, ecx
nop
movzx eax, word [ebp + ecx - 0xa40]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x42a], ax
test ax, ax
jne 0x40c430
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c451
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x40c5ca
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x428]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40c470
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x220]
push eax
call esi
test eax, eax
jle 0x40c5d0
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
lea eax, [ebp - 0x107c]
push eax
xorps xmm0, xmm0
mov dword [ebp - 0x105c], 0
push 0
lea eax, [ebp - 0x220]
push eax
movups xmmword [ebp - 0x107c], xmm0
movups xmmword [ebp - 0x106c], xmm0
call edi
test eax, eax
setne al
test al, al
je 0x40c5d0
push 0x208
lea eax, [ebp - 0x630]
push 0
push eax
call fcn.0057ff70
add esp, 0xc
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x220]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x632], ax
test ax, ax
jne 0x40c500
lea ecx, [ebp - 0x630]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40c521
mov eax, dword [str.GDeZip.exe]
mov dword [ecx], eax
mov eax, dword [0x623bfc]
mov dword [ecx + 4], eax
mov eax, dword [0x623c00]
mov dword [ecx + 8], eax
mov eax, dword [0x623c04]
mov dword [ecx + 0xc], eax
mov eax, dword [0x623c08]
mov dword [ecx + 0x10], eax
mov ax, word [0x623c0c]
mov word [ecx + 0x14], ax
lea eax, [ebp - 0x630]
push eax
call esi
test eax, eax
jle 0x40c5d0
lea eax, [ebp - 0x107c]
mov dword [ebp - 0x105c], 0
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x630]
push 0
push eax
movups xmmword [ebp - 0x107c], xmm0
movups xmmword [ebp - 0x106c], xmm0
call edi
test eax, eax
setne al
test al, al
je 0x40c5d0
mov esi, dword [ebp - 0x1098]
lea eax, [ebp - 0x428]
push eax
lea ecx, [esi + 0x44]
call fcn.004049c0
lea eax, [ebp - 0x220]
push eax
lea ecx, [esi + 0x74]
call fcn.004049c0
jmp 0x40ca2d
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
sub esp, 0x18
mov ecx, esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 8
jb 0x40c5ed
mov eax, dword [ecx]
jmp 0x40c5ef
mov eax, ecx
push 7
xor edx, edx
push str.roaming
mov word [eax], dx
call fcn.00404db0
lea ecx, [ebp - 0x1094]
call fcn.0041ca40
add esp, 0x18
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x1094]
cmp dword [ebp - 0x1080], 8
lea edx, [ebp - 0xc48]
cmovae ecx, dword [ebp - 0x1094]
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x40c630
lea ecx, [ebp - 0xc48]
add ecx, 0xfffffffe
nop word [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40c650
mov eax, dword [0x623ac8]
lea edi, [ebp - 0xc48]
mov dword [ecx], eax
add edi, 0xfffffffe
mov eax, dword [0x623acc]
mov dword [ecx + 4], eax
mov eax, dword [0x623ad0]
mov dword [ecx + 8], eax
mov eax, dword [0x623ad4]
mov dword [ecx + 0xc], eax
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x40c684
mov eax, dword [0x623ae4]
xor ecx, ecx
mov dword [edi], eax
nop dword [eax]
movzx eax, word [ebp + ecx - 0xc48]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x42a], ax
test ax, ax
jne 0x40c6a0
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x428]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40c6c0
lea eax, [ebp - 0x220]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jle 0x40c850
lea eax, [ebp - 0x107c]
mov dword [ebp - 0x105c], 0
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x220]
push 0
push eax
movups xmmword [ebp - 0x107c], xmm0
movups xmmword [ebp - 0x106c], xmm0
call edi
test eax, eax
setne al
test al, al
je 0x40c850
push 0x208
lea eax, [ebp - 0x630]
push 0
push eax
call fcn.0057ff70
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x220]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x632], ax
test ax, ax
jne 0x40c741
lea ecx, [ebp - 0x630]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40c762
mov eax, dword [str.GDeZip.exe]
mov dword [ecx], eax
mov eax, dword [0x623bfc]
mov dword [ecx + 4], eax
mov eax, dword [0x623c00]
mov dword [ecx + 8], eax
mov eax, dword [0x623c04]
mov dword [ecx + 0xc], eax
mov eax, dword [0x623c08]
mov dword [ecx + 0x10], eax
mov ax, word [0x623c0c]
mov word [ecx + 0x14], ax
lea eax, [ebp - 0x630]
push eax
call esi
test eax, eax
jle 0x40c850
lea eax, [ebp - 0x107c]
mov dword [ebp - 0x105c], 0
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x630]
push 0
push eax
movups xmmword [ebp - 0x107c], xmm0
movups xmmword [ebp - 0x106c], xmm0
call edi
test eax, eax
setne al
test al, al
je 0x40c850
cmp word [ebp - 0x428], 0
jne 0x40c7f4
xor ecx, ecx
jmp 0x40c80f
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c800
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x1098]
lea eax, [ebp - 0x428]
push ecx
push eax
lea ecx, [esi + 0x44]
call fcn.00404db0
cmp word [ebp - 0x220], 0
jne 0x40c836
xor ecx, ecx
jmp 0x40c9ff
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c840
jmp 0x40c9fb
lea ecx, [ebp - 0xa40]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c860
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x40c960
lea eax, [ebp - 0xa40]
push eax
call esi
test eax, eax
jle 0x40c960
lea eax, [ebp - 0x107c]
mov dword [ebp - 0x105c], 0
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0xa40]
push 0
push eax
movups xmmword [ebp - 0x107c], xmm0
movups xmmword [ebp - 0x106c], xmm0
call edi
test eax, eax
setne al
test al, al
je 0x40c960
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xa40]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x42a], ax
test ax, ax
jne 0x40c8c4
xor ecx, ecx
nop
movzx eax, word [ebp + ecx - 0x428]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40c8e0
cmp word [ebp - 0x428], ax
jne 0x40c905
xor ecx, ecx
jmp 0x40c91f
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c910
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x1098]
lea eax, [ebp - 0x428]
push ecx
push eax
lea ecx, [esi + 0x44]
call fcn.00404db0
cmp word [ebp - 0x220], 0
jne 0x40c946
xor ecx, ecx
jmp 0x40c9ff
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c950
jmp 0x40c9fb
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xc48]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x42a], ax
test ax, ax
jne 0x40c962
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x428]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40c980
cmp word [ebp - 0x428], ax
jne 0x40c9a5
xor ecx, ecx
jmp 0x40c9bf
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c9b0
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x1098]
lea eax, [ebp - 0x428]
push ecx
push eax
lea ecx, [esi + 0x44]
call fcn.00404db0
cmp word [ebp - 0x220], 0
jne 0x40c9e3
xor ecx, ecx
jmp 0x40c9ff
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c9f0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x220]
push eax
lea ecx, [esi + 0x74]
call fcn.00404db0
mov eax, dword [ebp - 0x1080]
cmp eax, 8
jb 0x40ca2d
inc eax
lea ecx, [ebp - 0x1094]
push eax
push dword [ebp - 0x1094]
call fcn.00405130
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00579ec9
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret