Function at 0x140003d50
Capabilities:
Enumerate files on windows
Query environment variable
Read .ini file

Disassembly:
sub rsp, 0x28
lea rdx, str.UpdateDriversAfterFWUpgrade:_ushwbfdrv.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.ushwbfdrv.inf
call 0x140003d50
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmccid.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmccid.inf
call 0x140003d50
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmnfcusb.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmnfcusb.inf
call 0x140003d50
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmnfcser.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmnfcser.inf
call 0x140003d50
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmnfcusb7.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmnfcusb7.inf
call 0x140003d50
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmnfcscr7.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmnfcscr7.inf
call 0x140003d50
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmnfcser7.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmnfcser7.inf
add rsp, 0x28
jmp 0x140003d50
push rbp
push rbx
push rdi
push r12
push r13
lea rbp, [rsp - 0x1240]
mov eax, 0x1340
call fcn.14002ada0
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x1230], rax
mov rbx, rcx
mov qword [rsp + 0x38], rcx
lea rcx, [rbp + 0x5f0]
xor edx, edx
mov r8d, 0x208
call fcn.14000c770
xor edx, edx
lea rcx, [rbp + 0xe20]
mov r8d, 0x208
call fcn.14000c770
xor r12d, r12d
lea rcx, [rbp + 0x102a]
xor edx, edx
mov word [rbp + 0x1028], r12w
mov r8d, 0x206
call fcn.14000c770
xor edx, edx
lea rcx, [rbp + 0xa10]
mov r8d, 0x208
call fcn.14000c770
xor edx, edx
mov word [rbp + 0xc18], r12w
mov r8d, 0x206
lea rcx, [rbp + 0xc1a]
call fcn.14000c770
mov r8d, 0x104
mov dword [rsp + 0x30], r12d
lea rdx, [rbp + 0x800]
lea rcx, str._SystemDrive_
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea r9, [rbp + 0x800]
mov qword [rsp + 0x20], rbx
lea r8, str._sWindowsSystem32DriverStoreFileRepository_s
mov edx, 0x10f
lea rcx, [rbp + 0x5f0]
call fcn.1400040e0
lea rdx, [rsp + 0x40]
mov edi, r12d
lea rcx, [rbp + 0x5f0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x1400040af
mov qword [rsp + 0x1378], rsi
lea ebx, [r12 + 1]
mov r12, qword [rsp + 0x38]
mov qword [rsp + 0x1380], r14
mov qword [rsp + 0x1388], r15
test byte [rsp + 0x40], 0x10
je 0x140003f7e
lea rdx, str.INSTALL_driver_package_from_DRIVERSTORE:_Found_driver_in_DRIVERSTORE_n
mov ecx, ebx
call fcn.1400016a0
movsxd rax, edi
lea rsi, [rbp + 0xe20]
imul r15, rax, 0x208
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x28], r12
add rsi, r15
mov qword [rsp + 0x20], rax
mov rcx, rsi
lea r9, [rbp + 0x800]
lea r8, str._sWindowsSystem32DriverStoreFileRepository_s_s
mov edx, 0x10f
call fcn.1400040e0
lea rdx, [rbp + 0x190]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140003f7e
mov eax, 0x30
lea rcx, [rbp + 0x3e2]
xor edx, edx
mov word [rbp + 0x3e0], ax
mov r8d, 0x206
call fcn.14000c770
lea r9, [rbp + 0x3e0]
mov qword [rsp + 0x28], rsi
xor r8d, r8d
mov dword [rsp + 0x20], 0x104
lea rdx, str.DriverVer
lea rcx, str.Version
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea rdx, [0x1400366c8]
lea rcx, [rbp + 0x3e0]
call fcn.14000a610
test rax, rax
je 0x140003f75
lea rcx, [rbp + 0xa10]
mov edx, 0x104
add rcx, r15
lea r8, [rax + 2]
call fcn.140018988
inc edi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x140003f99
cmp edi, 2
jl 0x140003e84
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindClose]
mov r15, qword [rsp + 0x1388]
mov r12d, 0
mov r14, qword [rsp + 0x1380]
mov rsi, qword [rsp + 0x1378]
cmp edi, 2
jne 0x140003ffa
lea rax, [rbp + 0xa10]
lea r8, [rbp + 0xc18]
sub r8, rax
nop word [rax + rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x140003ff4
add rax, 2
test ecx, ecx
jne 0x140003fe0
test edx, edx
cmovne r12d, ebx
lea rcx, str.difxapi.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
jne 0x14000404e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RunDriverPackageInstall_LoadLibrary_failed_gle0x_08x_n
mov ecx, ebx
call fcn.1400016a0
mov eax, ebx
mov r9d, eax
lea rdx, str.INSTALL_driver_package_from_DRIVERSTORE:_STATUS:__d__0x_x__n
mov r8d, eax
mov ecx, 2
call fcn.1400016a0
cmp dword [rsp + 0x30], 0
je 0x1400040c0
lea rdx, str.INSTALL_driver_package_from_DRIVERSTORE:_NEED_RESTART_n
mov ecx, ebx
jmp 0x1400040bb
lea rdx, str.DriverPackageInstallW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r10, rax
test rax, rax
jne 0x140004078
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RunDriverPackageInstall_GetProcAddress_failed_gle0x_08x_n
jmp 0x14000401c
movsxd rax, r12d
lea r9, [rsp + 0x30]
imul rcx, rax, 0x208
xor r8d, r8d
lea rax, [rbp + 0xe20]
add rcx, rax
lea edx, [r8 + 3]
call r10
test eax, eax
jne 0x140004025
lea rdx, str.INSTALL_driver_package_from_DRIVERSTORE:_SUCCESS_n
mov ecx, ebx
call fcn.1400016a0
jmp 0x14000403c
lea rdx, str.INSTALL_driver_package_from_DRIVERSTORE:_Didnt_find_any_driver_n
mov ecx, 1
call fcn.1400016a0
mov rcx, qword [rbp + 0x1230]
xor rcx, rsp
call fcn.140009290
add rsp, 0x1340
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret