Function at 0x4017e4
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffda4
push ebx
push esi
push edi
lea ebx, [ebp - 0x54]
mov eax, 0x485d48
call fcn.00473cf0
mov word [ebx + 0x10], 0xc
lea eax, [ebp - 4]
call fcn.004026f0
inc dword [ebx + 0x1c]
lea edx, [ebp - 0x25c]
mov word [ebx + 0x10], 0x18
push edx
push 0xff
call sub.KERNEL32.DLL_GetTempPathW
mov word [ebx + 0x10], 0x24
lea edx, [ebp - 0x25c]
lea eax, [ebp - 8]
call fcn.00481c9c
inc dword [ebx + 0x1c]
lea edx, [ebp - 8]
lea eax, [ebp - 4]
call fcn.00481d28
dec dword [ebx + 0x1c]
lea eax, [ebp - 8]
mov edx, 2
call fcn.00481d00
mov word [ebx + 0x10], 0x30
lea eax, [ebp - 0xc]
call fcn.004026f0
push eax
inc dword [ebx + 0x1c]
cmp dword [ebp - 4], 0
je 0x401877
mov edx, dword [ebp - 4]
mov edx, dword [edx - 4]
jmp 0x401879
xor edx, edx
lea eax, [ebp - 4]
mov ecx, 1
call fcn.00481d70
lea ecx, [ebp - 0xc]
push ecx
lea eax, [ebp - 0x10]
mov dx, 0x5c
call fcn.00404b58
inc dword [ebx + 0x1c]
lea edx, [ebp - 0x10]
pop eax
call fcn.00481d3c
push eax
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00481d00
dec dword [ebx + 0x1c]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00481d00
pop ecx
test cl, cl
je 0x4019b1
call fcn.00401548
test eax, eax
je 0x401943
mov word [ebx + 0x10], 0x3c
mov ecx, dword [str.HwRwDrv.x64]
push ecx
lea eax, [ebp - 0x25c]
push eax
push 0x4845e0
lea eax, [ebp - 0x14]
call fcn.00404bb8
push eax
inc dword [ebx + 0x1c]
call fcn.00481ad4
add esp, 0x10
mov esi, eax
mov edx, dword [esi]
lea eax, [ebp - 0x18]
call fcn.00481c9c
inc dword [ebx + 0x1c]
lea edx, [ebp - 0x18]
mov eax, 0x48fd04
call fcn.00481d28
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.00481d00
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00481a64
jmp 0x401a8e
mov word [ebx + 0x10], 0x48
mov ecx, dword [str.HwRwDrv.x86]
push ecx
lea ecx, [ebp - 0x25c]
push ecx
push 0x4845ea
lea eax, [ebp - 0x1c]
call fcn.00404bb8
push eax
inc dword [ebx + 0x1c]
call fcn.00481ad4
add esp, 0x10
mov esi, eax
mov edx, dword [esi]
lea eax, [ebp - 0x20]
call fcn.00481c9c
inc dword [ebx + 0x1c]
lea edx, [ebp - 0x20]
mov eax, 0x48fd04
call fcn.00481d28
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.00481d00
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00481a64
jmp 0x401a8e
call fcn.00401548
test eax, eax
je 0x401a25
mov word [ebx + 0x10], 0x54
mov ecx, dword [str.HwRwDrv.x86]
push ecx
lea ecx, [ebp - 0x25c]
push ecx
push 0x4845f4
lea eax, [ebp - 0x24]
call fcn.00404bb8
push eax
inc dword [ebx + 0x1c]
call fcn.00481ad4
add esp, 0x10
mov esi, eax
mov edx, dword [esi]
lea eax, [ebp - 0x28]
call fcn.00481c9c
inc dword [ebx + 0x1c]
lea edx, [ebp - 0x28]
mov eax, 0x48fd04
call fcn.00481d28
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00481d00
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00481a64
jmp 0x401a8e
mov word [ebx + 0x10], 0x60
mov ecx, dword [str.HwRwDrv.x64]
push ecx
lea ecx, [ebp - 0x25c]
push ecx
push str._s_s
lea eax, [ebp - 0x2c]
call fcn.00404bb8
push eax
inc dword [ebx + 0x1c]
call fcn.00481ad4
add esp, 0x10
mov esi, eax
mov edx, dword [esi]
lea eax, [ebp - 0x30]
call fcn.00481c9c
inc dword [ebx + 0x1c]
lea edx, [ebp - 0x30]
mov eax, 0x48fd04
call fcn.00481d28
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.00481d00
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.00481a64
call fcn.00401548
test eax, eax
je 0x401aa9
push 0xa
push str.HWRWDRVX64
push 0
call sub.KERNEL32.DLL_FindResourceW
mov esi, eax
jmp 0x401ab9
push 0xa
push str.HWRWDRVX86
push 0
call sub.KERNEL32.DLL_FindResourceW
mov esi, eax
test esi, esi
je 0x401bbd
push esi
push 0
call sub.KERNEL32.DLL_LoadResource
mov edi, eax
test edi, edi
je 0x401b9e
push esi
push 0
call sub.KERNEL32.DLL_SizeofResource
mov dword [ebp - 0x58], eax
push edi
call sub.KERNEL32.DLL_LockResource
mov edi, eax
push 0
push 0x100
push 2
push 0
push 0
push 0xc0000000
cmp dword [0x48fd04], 0
je 0x401b08
mov eax, dword [0x48fd04]
jmp 0x401b0d
mov eax, 0x484638
push eax
call sub.KERNEL32.DLL_CreateFileW
mov esi, eax
cmp esi, 0xffffffff
jne 0x401b3c
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 4]
dec dword [ebx + 0x1c]
call fcn.00481d00
pop eax
mov edx, dword [ebx]
mov dword fs:[0], edx
jmp 0x401bda
push 0
lea ecx, [ebp - 0x5c]
push ecx
mov ecx, dword [ebp - 0x58]
push ecx
push edi
push esi
call sub.KERNEL32.DLL_WriteFile
test eax, eax
jne 0x401b76
push esi
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 4]
dec dword [ebx + 0x1c]
call fcn.00481d00
pop eax
mov edx, dword [ebx]
mov dword fs:[0], edx
jmp 0x401bda
push esi
call sub.KERNEL32.DLL_CloseHandle
mov eax, 1
mov edx, 2
push eax
lea eax, [ebp - 4]
dec dword [ebx + 0x1c]
call fcn.00481d00
pop eax
mov edx, dword [ebx]
mov dword fs:[0], edx
jmp 0x401bda
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 4]
dec dword [ebx + 0x1c]
call fcn.00481d00
pop eax
mov edx, dword [ebx]
mov dword fs:[0], edx
jmp 0x401bda
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 4]
dec dword [ebx + 0x1c]
call fcn.00481d00
pop eax
mov edx, dword [ebx]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret