Function at 0x1400036e0
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 0x1400036e0
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmccid.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmccid.inf
call 0x1400036e0
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmnfcusb.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmnfcusb.inf
call 0x1400036e0
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 0x1400036e0
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmnfcusb7.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmnfcusb7.inf
call 0x1400036e0
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmnfcscr7.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmnfcscr7.inf
call 0x1400036e0
lea rdx, str.UpdateDriversAfterFWUpgrade:_bcmnfcser7.inf_n
mov ecx, 1
call fcn.1400016a0
lea rcx, str.bcmnfcser7.inf
add rsp, 0x28
jmp 0x1400036e0
push rbp
push rbx
push rdi
push r12
push r13
lea rbp, [rsp - 0x1240]
mov eax, 0x1340
call fcn.1400293e0
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.14000bc50
xor edx, edx
lea rcx, [rbp + 0xe20]
mov r8d, 0x208
call fcn.14000bc50
xor r12d, r12d
lea rcx, [rbp + 0x102a]
xor edx, edx
mov word [rbp + 0x1028], r12w
mov r8d, 0x206
call fcn.14000bc50
xor edx, edx
lea rcx, [rbp + 0xa10]
mov r8d, 0x208
call fcn.14000bc50
xor edx, edx
mov word [rbp + 0xc18], r12w
mov r8d, 0x206
lea rcx, [rbp + 0xc1a]
call fcn.14000bc50
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.140003a80
lea rdx, [rsp + 0x40]
mov ebx, r12d
lea rcx, [rbp + 0x5f0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x140003a42
mov qword [rsp + 0x1378], rsi
lea edi, [r12 + 1]
mov r12, qword [rsp + 0x38]
mov qword [rsp + 0x1380], r14
mov qword [rsp + 0x1388], r15
test byte [rsp + 0x40], 0x10
je 0x14000391b
lea rdx, str.INSTALL_driver_package_from_DRIVERSTORE:_Found_driver_in_DRIVERSTORE_n
mov ecx, edi
call fcn.1400016a0
movsxd rax, ebx
lea r14, [rbp + 0xe20]
imul rsi, rax, 0x208
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x28], r12
add r14, rsi
mov qword [rsp + 0x20], rax
mov rcx, r14
lea r9, [rbp + 0x800]
lea r8, str._sWindowsSystem32DriverStoreFileRepository_s_s
mov edx, 0x10f
call fcn.140003a80
lea rdx, [rbp + 0x190]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x14000391b
mov eax, 0x30
lea rcx, [rbp + 0x3e2]
xor edx, edx
mov word [rbp + 0x3e0], ax
mov r8d, 0x206
call fcn.14000bc50
lea r9, [rbp + 0x3e0]
mov qword [rsp + 0x28], r14
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, [0x140034318]
lea rcx, [rbp + 0x3e0]
call fcn.140009ae0
add rax, 2
lea rdx, [rbp + 0xa10]
sub rsi, rax
add rdx, rsi
nop word [rax + rax]
movzx ecx, word [rax]
mov word [rdx + rax], cx
lea rax, [rax + 2]
test cx, cx
jne 0x140003900
inc ebx
mov rcx, r15
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 0x140003936
cmp ebx, 2
jl 0x140003814
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 ebx, 2
jne 0x14000398d
lea rax, [rbp + 0xa10]
lea r8, [rbp + 0xc18]
sub r8, rax
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x140003987
add rax, 2
test ecx, ecx
jne 0x140003973
test edx, edx
cmovne r12d, edi
lea rcx, str.difxapi.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
jne 0x1400039e1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RunDriverPackageInstall_LoadLibrary_failed_gle0x_08x_n
mov ecx, edi
call fcn.1400016a0
mov eax, edi
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 0x140003a53
lea rdx, str.INSTALL_driver_package_from_DRIVERSTORE:_NEED_RESTART_n
mov ecx, edi
jmp 0x140003a4e
lea rdx, str.DriverPackageInstallW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r10, rax
test rax, rax
jne 0x140003a0b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RunDriverPackageInstall_GetProcAddress_failed_gle0x_08x_n
jmp 0x1400039af
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 0x1400039b8
lea rdx, str.INSTALL_driver_package_from_DRIVERSTORE:_SUCCESS_n
mov ecx, edi
call fcn.1400016a0
jmp 0x1400039cf
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.140008770
add rsp, 0x1340
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret