Function at 0x40342e
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Get common file path
Get file attributes
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x27c
mov eax, dword [0x4105f0]
xor eax, esp
mov dword [esp + 0x278], eax
push ebx
mov ebx, ecx
xor ecx, ecx
push esi
push edi
mov dword [esp + 0x10], ebx
cmp dword [ebp + 8], ecx
jne 0x4034f9
cmp dword [ebp + 0x10], 3
je 0x40377a
mov eax, dword [ebx + 0x10]
lea esi, [ebx + 0x28]
mov dword [esp + 0x1c], eax
lea edi, [esp + 0x64]
mov eax, dword [ebx]
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x18], 0x4c
mov dword [esp + 0x24], 0x4027e4
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], 0x104
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], 0x402804
mov dword [esp + 0x4c], 4
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameA]
test eax, eax
je 0x403512
mov dword [ebx + 0x18], 1
cmp dword [ebp + 0x10], 1
jne 0x403519
push 3
jmp 0x403521
push dword [ebp + 8]
lea esi, [ebx + 0x28]
mov edx, 0x104
mov ecx, esi
call fcn.0040302a
test eax, eax
jns 0x4034ef
mov byte [esi], 0
xor eax, eax
jmp 0x403763
cmp dword [ebp + 0x10], 2
jne 0x403524
push 0x13
pop edi
jmp 0x40353d
cmp dword [ebp + 0x10], 3
jne 0x40352e
xor edi, edi
jmp 0x40353d
xor eax, eax
cmp dword [ebp + 0xc], 0x45
setne al
mov dword [esp + 0xc], eax
mov edi, eax
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403542
sub ecx, edx
add ecx, 0x28
add ecx, ebx
jmp 0x403558
cmp byte [ecx], 0x2e
je 0x40355c
dec ecx
cmp ecx, esi
jne 0x403552
and dword [esp + 0xc], 0
cmp ecx, esi
je 0x403684
mov ebx, dword [esp + 0xc]
inc ecx
mov dl, byte [ecx]
lea eax, [edx - 0x41]
cmp al, 0x19
ja 0x40357a
add dl, 0x20
lea eax, [edx - 0x61]
cmp al, 0x19
ja 0x40358b
mov byte [esp + ebx + 0xc], dl
inc ebx
cmp ebx, 4
jl 0x40356d
cmp ebx, 3
mov ebx, dword [esp + 0x10]
jne 0x403684
mov byte [esp + 0xf], 0
lea edx, [esp + 0xc]
xor ecx, ecx
movzx eax, byte [edx + ecx]
mov edx, 0x402834
cmp al, byte [edx + ecx]
lea edx, [esp + 0xc]
jne 0x403684
inc ecx
cmp ecx, 4
jne 0x4035a3
cmp dword [ebp + 0x10], 1
je 0x4035cf
cmp dword [ebp + 0x10], 2
jne 0x403684
xor edi, edi
push esi
inc edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x403677
push 0xa
push edi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [esp + 0x10], eax
test eax, eax
je 0x40366d
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40366d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esp + 0x14], eax
test eax, eax
je 0x40366d
push dword [esp + 0x10]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esp + 0xc], eax
test eax, eax
je 0x40366d
xor eax, eax
push eax
push 0x80
push edi
push eax
push eax
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x40366d
push 0
lea ecx, [esp + 0x10]
push ecx
push dword [esp + 0x14]
push dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40366d
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x403684
push 0x25
pop edx
mov ecx, esi
jmp 0x40377f
and al, 1
movzx eax, al
neg eax
sbb eax, eax
not eax
and edi, eax
push esi
push 0x41
push dword [ebx + 0x10]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
mov al, byte [ebx + 0x29]
cmp al, 0x3a
je 0x4036f4
cmp al, 0x5c
jne 0x4036a0
cmp byte [ebx + 0x28], al
je 0x4036f4
lea eax, [esp + 0x70]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push esi
lea eax, [esp + 0x74]
push eax
push 0x402838
lea eax, [esp + 0x184]
push 0x104
push eax
call fcn.004030ae
add esp, 0x14
test eax, eax
js 0x403512
lea eax, [esp + 0x178]
mov edx, 0x104
push eax
mov ecx, esi
call fcn.0040302a
test eax, eax
js 0x40350f
cmp dword [ebp + 0x10], 3
jne 0x403712
lea ecx, [ebx + 8]
call fcn.00403011
push eax
push 0
push esi
call dword [sym.imp.msi.dll_MsiOpenProductA]
test eax, eax
je 0x40375c
jmp 0x403744
mov ecx, ebx
call fcn.004033ee
lea ecx, [ebx + 4]
call fcn.00403011
push eax
push edi
push esi
call dword [sym.imp.msi.dll_MsiOpenProductA]
test eax, eax
je 0x40375c
lea ecx, [ebx + 4]
call fcn.00403011
push eax
push 0
push esi
call dword [sym.imp.msi.dll_MsiOpenProductA]
test eax, eax
je 0x403755
mov dword [ebx + 0xc], 1
mov edx, 0x402840
jmp 0x403670
mov dword [ebx + 0x1c], 1
and dword [ebx + 0xc], 0
xor eax, eax
inc eax
mov ecx, dword [esp + 0x284]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00406053
mov esp, ebp
pop ebp
ret 0xc
push 0x18
pop edx
xor ecx, ecx
call fcn.00403242
int3