Function at 0x40a3d0
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x509312
mov eax, dword fs:[0]
push eax
sub esp, 0x28c
mov eax, dword [0x5645bc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x298], ecx
mov ecx, dword [ebp - 0x298]
call fcn.00409ab0
mov dword [ebp - 0x284], eax
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x298]
call fcn.00409f00
mov dword [ebp - 4], 0
push 0x512e74
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x25c]
push edx
call fcn.004042c0
add esp, 0xc
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x25c]
call fcn.00401e80
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40a46e
lea ecx, [ebp - 0x25c]
call fcn.00401e80
push eax
call fcn.00437eb0
add esp, 4
push 0x512e80
lea ecx, [ebp - 0x25c]
call fcn.00403ac0
mov word [ebp - 0x23c], 0
push 0x206
push 0
lea eax, [ebp - 0x23a]
push eax
call fcn.00463f00
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x23c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
lea edx, [ebp - 0x23c]
push edx
call fcn.0040c390
add esp, 8
mov word [eax + 2], 0
lea eax, [ebp - 0x23c]
push eax
lea ecx, [ebp - 0x27c]
call fcn.00401c90
mov byte [ebp - 4], 2
push 0x512e94
push 0x6c06
mov ecx, dword [ebp - 0x284]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x288], eax
cmp dword [ebp - 0x288], 0
jne 0x40a55a
push 0
push 0x512ea0
push str.27654
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [ebp - 0x290], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x27c]
call fcn.00401cd0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x25c]
call fcn.00401cd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00401cd0
mov eax, dword [ebp - 0x290]
jmp 0x40a670
mov edx, dword [ebp - 0x288]
push edx
mov eax, dword [ebp - 0x284]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x280], eax
mov ecx, dword [ebp - 0x280]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x240], eax
mov edx, dword [ebp - 0x288]
push edx
mov eax, dword [ebp - 0x284]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x25c]
call fcn.00401e80
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40a5c8
lea ecx, [ebp - 0x25c]
call fcn.00401e80
push eax
call fcn.0043b3d0
add esp, 4
push 0
push 0x80
push 1
push 0
push 1
push 0x40000000
lea ecx, [ebp - 0x25c]
call fcn.00401e80
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x260], eax
cmp dword [ebp - 0x260], 0xffffffff
je 0x40a633
mov dword [ebp - 0x28c], 0
push 0
lea ecx, [ebp - 0x28c]
push ecx
mov edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x240]
push eax
mov ecx, dword [ebp - 0x260]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x260]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x294], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x27c]
call fcn.00401cd0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x25c]
call fcn.00401cd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00401cd0
mov eax, dword [ebp - 0x294]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00463ee8
mov esp, ebp
pop ebp
ret