Function at 0x42dd40
Capabilities:
Get common file path
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5e6f42
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x518
push ebx
push ebp
mov ebp, dword [esp + 0x530]
push esi
push edi
xor ebx, ebx
push 6
push ebp
mov dword [esp + 0x20], ebx
call fcn.0042d6b0
add esp, 8
test eax, eax
je 0x42dfcd
push ebx
call fcn.00419540
mov esi, eax
push esi
call fcn.00404320
push esi
mov dword [esp + 0x1c], eax
call fcn.00404340
mov esi, eax
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x135]
mov byte [esp + 0x134], bl
mov byte [esp + 0x434], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x435]
mov byte [esp + 0x334], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x335]
add esp, 0xc
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x328]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x328]
push ecx
push edx
lea eax, [esp + 0x130]
push 0x638274
push eax
call fcn.004446b2
add esp, 0x10
lea ecx, [esp + 0x328]
lea edx, [esp + 0x428]
push esi
push ecx
push 0x638274
push edx
call fcn.004446b2
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x39]
mov byte [esp + 0x38], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x239]
mov byte [esp + 0x238], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
add esp, 0x10
stosb byte es:[edi], al
push str.tpacket7.sys
push ebp
lea eax, [esp + 0x30]
push 0x638274
push eax
call fcn.004446b2
add esp, 0x10
lea ecx, [esp + 0x228]
push str.tpacket7.cat
push ebp
push 0x638274
push ecx
call fcn.004446b2
mov eax, dword [0x676468]
add esp, 0x10
or esi, 0xffffffff
cmp eax, ebx
je 0x42df19
lea edx, [esp + 0x28]
lea ecx, [esp + 0x14]
push edx
call fcn.0045d440
mov edi, eax
lea eax, [esp + 0x128]
lea ecx, [esp + 0x10]
push eax
mov dword [esp + 0x534], ebx
call fcn.0045d440
mov ecx, dword [edi]
mov edx, dword [eax]
push ecx
push edx
push str.PrepareInstallDirectory_6___s_______s_
push str.InstTpacketV
push 0xf
push 0x6763fc
mov byte [esp + 0x548], 1
call fcn.00429e80
add esp, 0x18
lea ecx, [esp + 0x10]
mov byte [esp + 0x530], bl
call fcn.0045ddc0
lea ecx, [esp + 0x14]
mov dword [esp + 0x530], esi
call fcn.0045ddc0
lea eax, [esp + 0x28]
push ebx
lea ecx, [esp + 0x12c]
push eax
push ecx
call fcn.0042d660
add esp, 0xc
test eax, eax
je 0x42dff7
push str.tpacket7.inf
push ebp
lea edx, [esp + 0x30]
push 0x638274
push edx
call fcn.004446b2
add esp, 0x10
lea eax, [esp + 0x28]
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, esi
je 0x42e077
mov edx, dword [str.___________________________________________________________________________r_n__TPacket7.INF____NDIS_Usermode_I_O_Driver_r_n__r_n__Copyright__c__Microsoft_Corporation.__All_rights_reserved._r_n___________________________________________________________________________r_n_version__r_nSignature____t___Windows_NT___r_nClass______t_NetService_r_nClassGUID___t_4D36E974_E325_11CE_BFC1_08002BE10318_r_nProvider_____t__Msft__r_nDriverVer___t_03_17_2016_3.31.202.0_r_nCatalogFile_tpacket7.cat_r_n_r_n_Manufacturer__r_n_Msft_MSFT_NTx86_NTia64_NTamd64_r_n_r_n_MSFT.NTx86__r_n_TPacket7_Desc_Install__TPacket7_r_n_r_n_MSFT.NTia64__r_n_TPacket7_Desc_Install__TPacket7_r_n_r_n_MSFT.NTamd64__r_n_TPacket7_Desc_Install__TPacket7_r_n_r_n___________________________________________________________________________r_n__Installation_Section_r_n___________________________________________________________________________r_n_Install__r_nAddRegInst_Ndi_r_nCharacteristics0x40008_r_nNetCfgInstanceId_3f1eaa9f_7472_4d8e_a69f_b23588a92f1b__r_nCopyfiles__tpacket7.copyfiles.sys_r_n_r_n_SourceDisksNames__r_n1_TPacket7_Desc_______r_n_r_n_SourceDisksFiles__r_nTPacket7.sys1_r_n_r_n_DestinationDirs__r_nDefaultDestDir12_r_nTPacket7.copyfiles.sys12_r_n_r_n_TPacket7.copyfiles.sys__r_nTPacket7.sys___2_r_n_r_n_r_n___________________________________________________________________________r_n__Ndi_installation_support_r_n___________________________________________________________________________r_n_Inst_Ndi__r_nHKR__Ndi_Service___TPacket7__r_nHKR__Ndi_CoServices_0x00010000__TPacket7__r_nHKR__Ndi_HelpText___TPacket7_HelpText__r_nHKR__Ndi_FilterClass___compression_r_nHKR__Ndi_FilterType_0x00010001_0x00000002_r_nHKR__NdiInterfaces_UpperRange___noupper__r_nHKR__NdiInterfaces_LowerRange___nolower__ndis5__r_nHKR__NdiInterfaces__FilterMediaTypes___ethernet__wan__atm__ndis5__r_nHKR__NdiInterfaces__LowerExclude_______ndisatm__ndiscowan__ndiswan__ndiswanasync__ndiswanipx__ndiswannbf__r_nHKR__Ndi_FilterRunType__0x00010001__2__this_filter_must_run_before_any_protocol_can_bind_to_the_below_miniport__r_n_r_n___________________________________________________________________________r_n__Service_installation_support_r_n___________________________________________________________________________r_n_Install.Services__r_nAddServiceTPacket7__TPacket7_Service_Inst_r_n_r_n_TPacket7_Service_Inst__r_nDisplayName_______TPacket7_Desc__r_nServiceType______1__SERVICE_KERNEL_DRIVER_r_nStartType________1__SERVICE_SYSTEM_START_r_nErrorControl_____1__SERVICE_ERROR_NORMAL_r_nServiceBinary_____12_TPacket7.sys_r_nLoadOrderGroup___NDIS_r_nDescription_______TPacket7_Desc__r_nAddReg___________Common.Params.reg_r_n_r_n_Install.Remove.Services__r_nDelServiceTPacket7_0x200_r_n_r_n_Install.Remove__r_nDelFiles__TPacket7.copyfiles.sys_r_n_r_n_Common.Params.reg__r_n_r_nHKR__FilterDriverParamsDriverParam___t_tParamDesc___t___Driverparam_for_lwf__r_nHKR__FilterDriverParamsDriverParam___t_tdefault___t___5__r_nHKR__FilterDriverParamsDriverParam___t_ttype___t_t___int__r_n_r_nHKR__FilterAdapterParamsAdapterParam___t_tParamDesc___t___Adapterparam_for_lwf__r_nHKR__FilterAdapterParamsAdapterParam___t_tdefault___t___10__r_nHKR__FilterAdapterParamsAdapterParam___t_ttype___t_t___int__r_n_r_n_Strings__r_nMsft___TEC_Solutions_Limited.__r_nTPacket7_Desc___TPacket7_Driver__r_nTPacket7_HelpText___TPacket7_Driver__r_n]
lea ecx, [esp + 0x20]
push ebx
push ecx
mov edi, edx
mov ecx, esi
xor eax, eax
mov dword [esp + 0x28], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x228]
push ebx
lea eax, [esp + 0x42c]
push edx
push eax
call fcn.0042d660
add esp, 0xc
test eax, eax
je 0x42e09f
mov dword [esp + 0x18], 1
jmp 0x42e11e
cmp dword [0x676468], ebx
je 0x42e11e
push str.PrepareInstallDirectory1_3
push str.InstTpacketV
push 0xf
push 0x6763fc
call fcn.00429e80
add esp, 0x10
jmp 0x42e11e
cmp dword [0x676468], ebx
je 0x42e11e
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x14]
call fcn.0045d440
mov edi, eax
lea edx, [esp + 0x128]
mov ebx, 2
push edx
lea ecx, [esp + 0x18]
mov dword [esp + 0x534], ebx
call fcn.0045d440
mov ecx, dword [edi]
mov edx, dword [eax]
push ecx
push edx
push str.PrepareInstallDirectory1_4___s____s_
push str.InstTpacketV
push 0xf
push 0x6763fc
mov byte [esp + 0x548], 3
call fcn.00429e80
add esp, 0x18
lea ecx, [esp + 0x14]
mov byte [esp + 0x530], bl
call fcn.0045ddc0
mov dword [esp + 0x530], esi
lea ecx, [esp + 0x10]
jmp 0x42e119
cmp dword [0x676468], ebx
je 0x42e11e
push esi
push str.PrepareInstallDirectory1_1_0x_lx
push str.InstTpacketV
push 0xf
push 0x6763fc
call fcn.00429e80
add esp, 0x14
jmp 0x42e11e
cmp dword [0x676468], ebx
je 0x42e11e
lea eax, [esp + 0x228]
lea ecx, [esp + 0x1c]
push eax
call fcn.0045d440
mov edi, eax
lea ecx, [esp + 0x428]
mov ebx, 4
push ecx
lea ecx, [esp + 0x28]
mov dword [esp + 0x534], ebx
call fcn.0045d440
mov edx, dword [edi]
mov eax, dword [eax]
push edx
push eax
push str.PrepareInstallDirectory1_10___s____s_
push str.InstTpacketV
push 0xf
push 0x6763fc
mov byte [esp + 0x548], 5
call fcn.00429e80
add esp, 0x18
lea ecx, [esp + 0x24]
mov byte [esp + 0x530], bl
call fcn.0045ddc0
mov dword [esp + 0x530], esi
lea ecx, [esp + 0x1c]
call fcn.0045ddc0
mov ecx, dword [esp + 0x528]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x524
ret