Function at 0x4138d0
Capabilities:
Extract resource via kernel32 functions
Query environment variable
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a5123
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x270
mov eax, dword [0x4ea008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebx + 8]
lea eax, [ebp - 0x220]
push 0x208
push 0
mov dword [ebp - 0x27c], esi
push eax
mov dword [ebp - 0x248], esi
mov dword [ebp - 0x240], 0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x220]
push 0x104
push eax
push str.systemroot
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0xf
xor eax, eax
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x264], 0
lea ecx, [ebp - 0x278]
push str.ShortcutEmp.ico
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x264], 7
mov word [ebp - 0x278], ax
call fcn.004122a0
mov dword [ebp - 4], 1
xor eax, eax
lea ecx, [ebp - 0x220]
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 7
mov word [ebp - 0x260], ax
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4139e0
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x260]
call fcn.004122a0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x278]
push eax
lea edx, [ebp - 0x260]
lea ecx, [ebp - 0x23c]
call fcn.00478280
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x260]
call fcn.00412240
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x278]
call fcn.00412240
cmp dword [ebp - 0x228], 8
lea eax, [ebp - 0x23c]
push 0
cmovae eax, dword [ebp - 0x23c]
push 0x100
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x244], edi
cmp edi, 0xffffffff
jne 0x413abd
xor eax, eax
mov dword [esi + 0x10], 0
xor ecx, ecx
mov dword [esi + 0x14], 7
mov word [esi], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413a91
sub ecx, edx
sar ecx, 1
push ecx
push 0
mov ecx, esi
call fcn.004122a0
mov dword [ebp - 0x240], 1
mov byte [ebp - 4], 0
jmp 0x413bc5
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x413b1c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [esi + 0x10], 0
xor ecx, ecx
mov dword [esi + 0x14], 7
mov word [esi], ax
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413af0
sub ecx, edx
sar ecx, 1
push ecx
push 0
mov ecx, esi
call fcn.004122a0
mov dword [ebp - 0x240], 1
mov byte [ebp - 4], 0
jmp 0x413bc5
push 0x4c1fc8
push 0x66
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, dword [ebp - 0x244]
lea ecx, [ebp - 0x224]
push 0
push ecx
push eax
push edi
push esi
mov dword [ebp - 0x224], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov esi, dword [ebp - 0x248]
xor eax, eax
movups xmm0, xmmword [ebp - 0x23c]
mov word [ebp - 0x23c], ax
mov dword [ebp - 0x240], 1
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x22c]
movq qword [esi + 0x10], xmm0
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 7
mov byte [ebp - 4], al
lea ecx, [ebp - 0x23c]
call fcn.00412240
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004a2dd3
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4