Function at 0x405780
Capabilities:
Create directory
Query or enumerate registry value

Disassembly:
sub esp, 0x40c
push ebx
push ebp
mov ebp, dword [esp + 0x418]
push esi
push edi
push 0x420
push ebp
call dword [sym.imp.kernel32.dll_RtlZeroMemory]
mov eax, dword [esp + 0x424]
mov dword [ebp], eax
mov eax, dword [0x42deb4]
test eax, eax
push 0x104
je 0x4057c8
mov edx, dword [0x42de28]
lea ecx, [esp + 0x214]
push ecx
push edx
call eax
jmp 0x405803
mov ecx, dword [0x42de28]
lea eax, [esp + 0x8c]
push eax
push ecx
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
mov ecx, dword [0x42deec]
push 0x104
lea edx, [esp + 0x214]
push edx
push 0xffffffffffffffff
lea eax, [esp + 0x94]
push eax
push 0
push ecx
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
add ebp, 0x10
mov esi, ebp
call fcn.004075c0
test eax, eax
je 0x4058dd
mov eax, dword [0x42de68]
test eax, eax
push 0
je 0x405825
push ebp
call eax
jmp 0x405855
mov eax, dword [0x42deec]
push 0
push 0x104
lea edx, [esp + 0x94]
push edx
push 0xffffffffffffffff
push ebp
push 0
push eax
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
push 0
lea ecx, [esp + 0x8c]
push ecx
call dword [sym.imp.kernel32.dll_CreateDirectoryA]
cmp word [esp + 0x210], 0
lea eax, [esp + 0x210]
je 0x405870
add eax, 2
cmp word [eax], 0
jne 0x405867
lea edx, [esp + 0x210]
sub eax, edx
sar eax, 1
lea eax, [esp + eax*2 + 0x210]
mov ecx, edx
cmp eax, ecx
jbe 0x40589c
cmp word [eax], 0x5c
je 0x4058a2
sub eax, 2
lea edx, [esp + 0x210]
cmp eax, edx
ja 0x405888
cmp word [eax], 0x5c
jne 0x4058a5
add eax, 2
mov esi, eax
mov eax, ebp
cmp word [eax], 0
lea edx, [eax + 0x206]
je 0x4058c2
cmp eax, edx
jae 0x405905
add eax, 2
cmp word [eax], 0
jne 0x4058b5
cmp eax, edx
jae 0x405905
movzx ecx, word [esi]
add esi, 2
test cx, cx
je 0x405905
mov word [eax], cx
add eax, 2
cmp eax, edx
jb 0x4058c6
jmp 0x405905
mov eax, ebp
lea esi, [eax + 0x206]
cmp eax, esi
lea edx, [esp + 0x210]
jae 0x405905
movzx ecx, word [edx]
add edx, 2
test cx, cx
je 0x405905
mov word [eax], cx
add eax, 2
cmp eax, esi
jb 0x4058f0
mov word [eax], 0
mov eax, ebp
cmp word [eax], 0
mov esi, 0x4190e8
lea edx, [eax + 0x206]
je 0x40592d
lea ecx, [ecx]
cmp eax, edx
jae 0x405946
add eax, 2
cmp word [eax], 0
jne 0x405920
cmp eax, edx
jae 0x405946
movzx ecx, word [esi]
add esi, 2
test cx, cx
je 0x405946
mov word [eax], cx
add eax, 2
cmp eax, edx
jb 0x405931
mov word [eax], 0
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.kernel32.dll_GetLocalTime]
push 0x800
mov esi, 0x10
lea edi, [esp + 0x2c]
mov eax, 0x419104
lea ebx, [esp + 0x1c]
call fcn.00407240
mov edx, edi
call fcn.004073f0
push 0x800
lea edi, [esp + 0x6c]
mov eax, 0x41911c
call fcn.004072e0
mov edx, edi
call fcn.004073f0
mov ebx, dword [esp + 0x420]
mov ecx, edi
push ecx
lea edx, [esp + 0x2c]
push edx
push 0x419130
mov esi, ebx
call fcn.00405210
add esp, 0xc
push ebp
push 0x41915c
call fcn.00405210
add esp, 8
push ebx
lea ecx, [esp + 0x214]
call fcn.004053d0
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.kernel32.dll_GetCurrentProcessId]
push eax
push 0x419180
call fcn.00405210
add esp, 0xc
push 0x94
lea eax, [esp + 0x8c]
push eax
mov byte [esp + 0x198], 0
call dword [sym.imp.kernel32.dll_RtlZeroMemory]
lea ecx, [esp + 0x88]
push ecx
mov dword [esp + 0x8c], 0x94
call dword [sym.imp.kernel32.dll_GetVersionExA]
test eax, eax
je 0x405ab3
cmp dword [esp + 0x98], 1
jne 0x405a59
mov eax, dword [esp + 0x94]
mov edx, eax
shr edx, 0x18
mov ecx, eax
shr ecx, 0x10
mov dword [esp + 0x8c], edx
movzx edx, cl
movzx eax, ax
mov dword [esp + 0x90], edx
mov dword [esp + 0x94], eax
lea edx, [esp + 0x9c]
call fcn.00407490
cmp byte [esp + 0x9c], 0
mov eax, 0x418c20
jne 0x405a79
mov eax, 0x41790f
mov edx, dword [esp + 0x94]
lea ecx, [esp + 0x9c]
push ecx
mov ecx, dword [esp + 0x90]
push eax
mov eax, dword [esp + 0x98]
push edx
push eax
push ecx
push 0x4191c0
mov esi, 0x80
lea edi, [esp + 0x1a8]
call fcn.004011f0
add esp, 0x18
lea edx, [esp + 0x10]
push edx
push 0x20019
push 0
push 0x4191d0
push 0x80000002
mov byte [esp + 0x3c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405b16
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0
push 0
push 0x4191f8
push edx
mov dword [esp + 0x2c], pe_nt_image_headers32
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405b0b
lea edx, [esp + 0x28]
call fcn.00407490
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x194]
push edx
push 0x419200
mov esi, ebx
call fcn.00405210
add esp, 0xc
push 0x419234
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x405b85
mov ebx, dword [sym.imp.kernel32.dll_GetProcAddress]
push 0x419240
push edi
call ebx
mov esi, eax
test esi, esi
je 0x405b7e
push 0x419254
push 0x419264
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
push eax
call ebx
test eax, eax
je 0x405b70
call eax
mov eax, dword [esp + 0x420]
push esi
push eax
call fcn.00405530
push edi
call dword [sym.imp.kernel32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40c
ret 8