Function at 0x405820
Capabilities:
Query or enumerate registry value
Set current directory

Disassembly:
sub esp, 0x194
push ebx
push esi
xor ebx, ebx
push edi
push ebx
call fcn.005f0b79
mov dword [esp + 0x38], eax
lea eax, [esp + 0x38]
push eax
call fcn.005f0a19
add esp, 8
call fcn.0045e0e0
mov esi, eax
cmp esi, ebx
je 0x4059f7
mov ecx, dword [esp + 0x1a4]
lea edx, [esp + 0xf]
mov dword [esi + 0x448], ecx
push 8
push edx
lea ecx, [esp + 0x18]
mov dword [esp + 0x4c], 0x104
call fcn.00405da0
lea ecx, [esp + 0xf]
push ebx
mov eax, dword [esp + 0x18]
push ecx
lea ecx, [esp + 0x48]
mov dword [esp + 0x40], ebx
mov byte [eax], bl
mov dword [esp + 0x44], ebx
call fcn.0046fe80
mov edi, str.regkey
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.regkey
push ecx
push str.regkey
lea ecx, [esp + 0x40]
call fcn.00406380
lea edx, [esp + 0x23]
push ebx
push edx
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.0046fe80
mov edi, str.startup
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.startup
push ecx
push str.startup
lea ecx, [esp + 0x30]
call fcn.00406380
lea eax, [esp + 0x38]
push 0x61f088
lea ecx, [esp + 0x2c]
push eax
lea edx, [esp + 0x6c]
push ecx
push edx
call fcn.00409be0
lea ecx, [esp + 0x20]
add esp, 0x10
cmp eax, ecx
je 0x40592b
mov edx, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax]
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00406830
lea ecx, [esp + 0x64]
call fcn.00406010
lea ecx, [esp + 0x28]
call fcn.00406010
lea ecx, [esp + 0x38]
call fcn.00406010
lea ecx, [esi + 0x4d4]
lea eax, [esp + 0x10]
cmp eax, ecx
je 0x405968
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
push eax
push edx
call fcn.00406830
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x24]
push eax
push 0x20019
push ebx
push ecx
push reloc.ijl15.dll_Ordinal_2
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4059c5
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x44]
lea eax, [esp + 0x9c]
push edx
push eax
push ebx
push ebx
push str.AppPath
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
jne 0x4059c5
lea eax, [esp + 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, esi
call fcn.00403f00
test al, al
je 0x4059db
mov ecx, esi
call fcn.00404190
test al, al
jne 0x405a05
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x34]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
sub ecx, eax
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.0041d810
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x194
ret 0x10
lea edi, [esi + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
mov eax, dword [edi]
lea edx, [esi + 0x16]
cmp eax, 1
mov dword [esi + 0x24], edx
mov edx, dword [esi]
mov ecx, esi
seta al
mov byte [esi + 0x28], al
mov eax, dword [esi + 0xc]
push eax
call dword [edx + 0x1c]
mov edx, dword [esi]
mov ecx, esi
mov eax, dword [esp + 0x1ac]
push eax
push 1
call dword [edx + 0x20]
test al, al
jne 0x405a5f
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x34]
lea ecx, [esp + 0x10]
call fcn.00406010
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x194
ret 0x10
mov eax, dword [esi + 0x4c8]
mov edi, dword [sym.imp.USER32.dll_GetWindowPlacement]
mov dword [esp + 0x1c], eax
push ebx
push ebx
push ebx
lea ecx, [esp + 0x54]
push ebx
push ecx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x405ada
push ebx
push ebx
lea edx, [esp + 0x50]
push ebx
push edx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x405b3a
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
lea eax, [esp + 0x48]
push eax
push ecx
push edx
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x405a6f
lea eax, [esp + 0x48]
push eax
call fcn.005ef4c0
add esp, 4
test al, al
jne 0x405a6f
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x405a6f
cmp byte [esi + 0x4a4], bl
je 0x405aeb
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
jmp 0x405a6f
mov ecx, dword [0x6285c8]
cmp byte [ecx + 4], bl
jne case.0x405b15.0
mov eax, dword [esi + 0x4c4]
lea edx, [esp + 0x70]
push edx
push eax
mov dword [esp + 0x78], 0x2c
call edi
mov eax, dword [esp + 0x78]
cmp eax, 7
ja case.0x405b15.1
jmp dword [eax*4 + 0x405b9c]
call dword [sym.imp.USER32.dll_WaitMessage]
jmp 0x405a6f
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x30]
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x405a6f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x34]
call fcn.00415c20
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x50]
sub eax, ecx
cmp ecx, ebx
je 0x405b8c
cmp eax, 0x80
jbe 0x405b76
push ecx
call fcn.005f0905
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x194
ret 0x10
dec eax
shr eax, 3
mov edx, dword [eax*4 + 0x61f1a0]
lea eax, [eax*4 + 0x61f1a0]
mov dword [ecx], edx
mov dword [eax], ecx
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x194
ret 0x10