Function at 0x404fb0
Capabilities:
Extract resource via kernel32 functions
Get common file path
Get startup folder

Disassembly:
sub esp, 0x484
mov eax, dword [0x41b188]
xor eax, esp
mov dword [esp + 0x480], eax
mov edx, dword [esp + 0x494]
mov eax, dword [esp + 0x488]
mov ecx, dword [esp + 0x490]
push ebx
push ebp
mov ebp, dword [esp + 0x4a4]
push esi
push edi
mov edi, dword [esp + 0x49c]
push 0x40
mov dword [esp + 0x28], edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x4ac]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x4b4]
lea edx, [esp + 0x44]
push 0
push edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x48], 0
call fcn.00407b90
add esp, 0xc
push 0x416918
push 0
push 2
call dword [0x41c2ac]
mov esi, eax
test esi, esi
je 0x405054
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4162a8
push 4
push edi
call dword [0x41c258]
mov ebx, eax
xor esi, esi
cmp ebx, esi
je 0x405085
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, esi
je 0x405085
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, esi
mov dword [esp + 0x10], eax
jne 0x405092
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
jmp 0x405255
mov ecx, dword [esp + 0x14]
push 1
push 7
lea eax, [esp + 0x88]
push eax
push ecx
mov word [esp + 0x90], si
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [esp + 0x80]
lea edx, [eax + 2]
jmp 0x4050c0
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4050c0
sub eax, edx
sar eax, 1
push str.AutoLogin.exe
lea edx, [esp + eax*2 + 0x84]
push 0x4169b4
push edx
call dword [0x41c2e8]
add esp, 0xc
cmp ebp, esi
je 0x40510f
lea eax, [esp + 0x80]
mov edx, ebp
mov ecx, eax
sub edx, ecx
jmp 0x405100
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, si
jne 0x405100
mov ebp, dword [sym.imp.KERNEL32.dll_SizeofResource]
push ebx
push edi
call ebp
mov edx, dword [esp + 0x10]
push eax
push edx
lea eax, [esp + 0x88]
push eax
call fcn.004037c0
add esp, 0xc
test eax, eax
je 0x4051cb
mov ecx, esi
add esi, 1
cmp ecx, 6
mov dword [esp + 0x28], esi
jge 0x405197
push 0x416918
push 0
push 2
call dword [0x41c2ac]
mov esi, eax
test esi, esi
je 0x405197
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push edi
call ebp
mov edx, dword [esp + 0x10]
push eax
push edx
lea eax, [esp + 0x88]
push eax
call fcn.004037c0
add esp, 0xc
test eax, eax
je 0x4051cb
mov esi, dword [esp + 0x28]
jmp 0x405137
cmp byte [0x41d2d8], 0
jne 0x405238
push 0
push 0x41d6e0
push 0x2f49
call fcn.004039a0
mov ecx, dword [esp + 0x20]
add esp, 4
push eax
push ecx
call dword [0x41c2d0]
xor eax, eax
jmp 0x405255
lea eax, [esp + 0x80]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4051d5
mov ecx, dword [esp + 0x18]
sub eax, edx
mov edx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x24]
push edx
push ecx
sar eax, 1
lea edx, [esp + eax*2 + 0x90]
push str.__configure__s__s___s___s
push edx
call dword [0x41c2e8]
add esp, 0x18
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x40]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
lea edx, [esp + 0xa0]
push edx
push 0
call dword [0x41c248]
test eax, eax
jne 0x40523c
xor eax, eax
jmp 0x405255
mov eax, dword [esp + 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x30]
push ecx
call esi
mov eax, 1
mov ecx, dword [esp + 0x490]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00407b7c
add esp, 0x484
ret