Function at 0x401b28
Capabilities:
Check if file exists
Delete file
Extract resource via kernel32 functions
Get common file path
Query environment variable
Set environment variable
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x68c]
sub esp, 0x70c
mov eax, dword [0x410eec]
and word [ebp + 0x470], 0
push ebx
push esi
push edi
mov esi, str._temp_
lea edi, [ebp + 0x678]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp + 0x688], eax
movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor eax, eax
mov ecx, 0x81
lea edi, [ebp + 0x472]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ebx, 0x104
push ebx
lea eax, [ebp + 0x470]
push eax
lea eax, [ebp + 0x678]
push eax
call esi
lea eax, [ebp + 0x470]
test eax, eax
jbe 0x401bb7
push eax
lea eax, [ebp + 0x678]
push eax
call fcn.0040480d
test eax, eax
pop ecx
pop ecx
je 0x401bb7
lea eax, [ebp + 0x470]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x401bd5
lea eax, [ebp + 0x470]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.C:Documents_and_SettingsAdministratorLocal_SettingsTemp
push str.temp
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push ebx
lea eax, [ebp + 0x470]
push eax
lea eax, [ebp + 0x678]
push eax
call esi
mov esi, str.0.0.0.0
lea edi, [ebp + 0x3a8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0x2e
pop ecx
xor eax, eax
lea edi, [ebp + 0x3b8]
rep stosd dword es:[edi], eax
xor esi, esi
mov word [ebp - 0x68], si
mov ecx, 0x81
lea edi, [ebp - 0x66]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
lea eax, [ebp - 0x68]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push esi
lea eax, [ebp + 0x3a8]
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.004015fa
lea eax, [ebp + 0x470]
push str.XGDL_
push eax
call fcn.004046cb
lea eax, [ebp + 0x3a8]
push eax
lea eax, [ebp + 0x470]
push eax
call fcn.004046cb
lea eax, [ebp + 0x470]
push 0x40c398
push eax
call fcn.004046cb
add esp, 0x24
lea eax, [ebp + 0x470]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x401c97
lea eax, [ebp + 0x470]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
cmp eax, esi
je 0x401c97
cmp eax, 0xb7
jne 0x401d7a
lea eax, [ebp + 0x470]
push eax
lea eax, [ebp + 0x1a0]
push eax
call fcn.004046f5
lea eax, [ebp + 0x1a0]
push 0x40c440
push eax
call fcn.004046cb
lea eax, [ebp + 0x1a0]
push eax
push 0x411830
call fcn.004046f5
add esp, 0x18
lea eax, [ebp + 0x1a0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor ecx, ecx
mov eax, 0x40c438
cmp ecx, eax
je 0x401d7a
lea ecx, [ebp + 0x1a0]
test ecx, ecx
je 0x401d7a
push eax
push 0x3e9
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, esi
je 0x401d7a
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp eax, esi
mov dword [ebp - 0x6c], eax
je 0x401d7a
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
cmp edi, esi
mov dword [ebp - 0x7c], edi
je 0x401d7a
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, esi
mov dword [ebp - 0x80], eax
je 0x401d7a
push esi
push 0x80
push 2
xor eax, eax
inc eax
push esi
push eax
mov dword [ebp - 0x74], eax
push 0x40000000
lea eax, [ebp + 0x1a0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x78], eax
je 0x401d73
push esi
push esi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x401d92
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
xor eax, eax
mov ecx, dword [ebp + 0x688]
pop edi
pop esi
pop ebx
call fcn.00403dcb
add ebp, 0x68c
leave
ret
xor edi, edi
cmp dword [ebp - 0x6c], esi
jbe 0x401dd2
mov ebx, 0xfa000
mov eax, dword [ebp - 0x6c]
sub eax, edi
cmp eax, ebx
jbe 0x401da9
mov eax, ebx
push esi
lea ecx, [ebp - 0x70]
push ecx
push eax
mov eax, dword [ebp - 0x80]
add eax, edi
push eax
push dword [ebp - 0x78]
mov dword [ebp - 0x70], esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401dcf
add edi, dword [ebp - 0x70]
cmp edi, dword [ebp - 0x6c]
jb 0x401d9e
jmp 0x401dd2
mov dword [ebp - 0x74], esi
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp - 0x74]
jmp 0x401d7c