Function at 0x404a40
Capabilities:
Extract resource via kernel32 functions
Get common file path
Hide graphical window
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x44c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_FindResourceA]
push ebp
push esi
push edi
push 0x41048c
push 1
push 0
call ebx
mov esi, eax
xor eax, eax
test esi, esi
je 0x404a74
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x404dee
lea eax, [esp + 0x5c]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x404ab6
mov cl, byte [esp + eax + 0x5b]
lea eax, [esp + eax + 0x5b]
cmp cl, 0x5c
je 0x404aa2
cmp cl, 0x2f
jne 0x404aa5
mov byte [eax], 0
lea ecx, [esp + 0x5c]
push 1
push ecx
call fcn.00405730
add esp, 8
jmp 0x404adc
mov edi, 0x410488
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x5c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x5c]
push ecx
push str._s_vae.vpkg
push 0x4133d8
call fcn.00406210
add esp, 0xc
push 0x410478
push 0x4133d8
call fcn.00405cc0
mov edi, eax
add esp, 8
xor esi, esi
test edi, edi
jne 0x404b6d
cmp esi, 0x3e7
jge 0x404b48
mov eax, esi
lea edx, [esp + 0x5c]
push eax
push edx
push str._s_vae_d.vpkg
push 0x4133d8
inc esi
call fcn.00406210
add esp, 0x10
push 0x410478
push 0x4133d8
call fcn.00405cc0
mov edi, eax
add esp, 8
test edi, edi
je 0x404b0d
test edi, edi
jne 0x404b6d
push edi
push str.Error
push str.Can_not_open_temp_file.
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44c
ret 0x10
mov ebp, 2
push 0x41048c
push ebp
push 0
call ebx
mov esi, eax
test esi, esi
je 0x404bbe
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push 1
push ebx
push eax
call fcn.004060c0
add esp, 0x10
inc ebp
push 0x41048c
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x404b82
mov ebx, dword [sym.imp.KERNEL32.dll_FindResourceA]
push edi
call fcn.00405b70
add esp, 4
push 0x41048c
push 0
push 0
call ebx
mov esi, eax
test esi, esi
je 0x404c1f
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
je 0x404c1f
lea eax, [ebp + 1]
push eax
call fcn.00405ac0
mov ecx, ebp
mov edi, eax
mov edx, ecx
mov dword [0x4137e0], eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x4137e0]
mov byte [ebp + eax], 0
push 0x41048c
push 1
push 0
call ebx
mov esi, eax
test esi, esi
je 0x404c76
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
je 0x404c76
lea ecx, [ebx + 1]
push ecx
call fcn.00405ac0
mov ecx, ebx
mov edi, eax
mov edx, ecx
mov dword [0x4137e4], eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x4137e4]
mov byte [ebx + eax], 0
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x10]
xor esi, esi
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x460]
push 0x7f00
push esi
mov dword [esp + 0x18], 0x30
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 0x405160
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], ecx
call dword [sym.imp.USER32.dll_LoadCursorA]
lea edx, [esp + 0x10]
mov dword [esp + 0x30], 0x10
push edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], str.main_win
call dword [sym.imp.USER32.dll_RegisterClassExA]
test ax, ax
jne 0x404cf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44c
ret 0x10
push esi
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
call esi
push 1
mov ebx, eax
call esi
mov ebp, eax
mov eax, dword [0x4137e0]
test eax, eax
je 0x404d24
push eax
lea eax, [esp + 0x60]
push str._s_Setup
push eax
call fcn.00406210
add esp, 0xc
jmp 0x404d4a
mov edi, str.Setup
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x5c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x460]
lea eax, [ebp - 0x15e]
cdq
push 0
push ecx
push 0
sub eax, edx
push 0
push 0xc8
sar eax, 1
push 0x190
push eax
lea eax, [ebx - 0x1c2]
cdq
sub eax, edx
lea edx, [esp + 0x78]
sar eax, 1
push eax
push 0x80c80000
push edx
push str.main_win
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
push 1
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
lea eax, [esp + 0x48]
push 0
push eax
call esi
test eax, eax
je 0x404ddc
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
lea ecx, [esp + 0x40]
push ecx
call edi
lea edx, [esp + 0x40]
push edx
call ebx
push 0
push 0
lea eax, [esp + 0x48]
push 0
push eax
call esi
test eax, eax
jne 0x404dbd
mov eax, dword [0x4137e0]
test eax, eax
je 0x404dee
push eax
call fcn.00405e20
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44c
ret 0x10