Function at 0x4784ec
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
sub esp, 0x2ac
lea ebp, [esp - 4]
mov eax, dword [0x5706b0]
xor eax, ebp
mov dword [ebp + 0x2ac], eax
push 0x58
mov eax, 0x50ee0b
call fcn.004ef9e2
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.setupapi.dll
mov dword [ebp - 0x2c], ecx
call esi
xor edi, edi
mov dword [ebp - 0x14], eax
cmp eax, edi
je 0x478a51
push str.HID.dll
call esi
mov ebx, eax
mov dword [ebp - 0x58], ebx
cmp ebx, edi
je 0x478a3f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetupDiEnumDeviceInterfaces
push dword [ebp - 0x14]
call esi
mov dword [ebp - 0x34], eax
cmp eax, edi
je 0x478a3f
push str.SetupDiDestroyDeviceInfoList
push dword [ebp - 0x14]
call esi
mov dword [ebp - 0x54], eax
cmp eax, edi
je 0x478a3f
push str.SetupDiGetDeviceInterfaceDetailA
push dword [ebp - 0x14]
call esi
mov dword [ebp - 0x44], eax
cmp eax, edi
je 0x478a3f
push str.SetupDiGetClassDevsA
push dword [ebp - 0x14]
call esi
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x478a3f
push str.HidD_GetHidGuid
push ebx
call esi
mov dword [ebp - 0x20], eax
cmp eax, edi
je 0x478a3f
push str.HidD_GetAttributes
push ebx
call esi
mov dword [ebp - 0x50], eax
cmp eax, edi
je 0x478a3f
push str.HidD_GetProductString
push ebx
call esi
mov dword [ebp - 0x40], eax
cmp eax, edi
je 0x478a3f
push str.HidD_GetPreparsedData
push ebx
call esi
mov dword [ebp - 0x48], eax
cmp eax, edi
je 0x478a3f
push str.HidP_GetCaps
push ebx
call esi
mov dword [ebp - 0x38], eax
cmp eax, edi
je 0x478a3f
push str.HidD_FreePreparsedData
push ebx
call esi
mov dword [ebp - 0x4c], eax
cmp eax, edi
je 0x478a3f
push str.HidD_GetSerialNumberString
push ebx
call esi
push str.HidP_GetValueCaps
push ebx
call esi
lea eax, [ebp + 0x9c]
push eax
call dword [ebp - 0x20]
push 0x12
push edi
push edi
lea eax, [ebp + 0x9c]
push eax
call dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
je 0x478a3f
lea ecx, [ebp + 0x80]
push ecx
push edi
lea ecx, [ebp + 0x9c]
push ecx
push edi
push eax
mov dword [ebp + 0x80], 0x1c
mov dword [ebp - 0x30], edi
call dword [ebp - 0x34]
test eax, eax
je 0x478a39
push edi
lea eax, [ebp - 0x3c]
push eax
push edi
push edi
lea eax, [ebp + 0x80]
push eax
push dword [ebp - 0x28]
call dword [ebp - 0x44]
mov esi, dword [ebp - 0x3c]
push esi
call fcn.004eee09
pop ecx
push 5
pop ebx
push edi
lea ecx, [ebp - 0x3c]
push ecx
push esi
push eax
mov dword [ebp - 0x18], eax
mov dword [eax], ebx
lea eax, [ebp + 0x80]
push eax
push dword [ebp - 0x28]
call dword [ebp - 0x44]
cmp eax, edi
je 0x478a0a
mov eax, dword [ebp - 0x18]
push edi
push 0x40000000
push 3
push edi
push 3
add eax, 4
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
or esi, 0xffffffff
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x478a0a
lea ecx, [ebp - 0x64]
push ecx
push eax
mov dword [ebp - 0x64], 0xc
call dword [ebp - 0x50]
test al, al
je 0x478a01
movzx eax, word [ebp - 0x60]
cmp eax, 0x51d
je 0x4788f3
cmp eax, 0x955
je 0x478845
cmp eax, 0x1044
jne 0x478a01
mov eax, 0x4001
cmp word [ebp - 0x5e], ax
jne 0x478a01
mov esi, 0x100
push esi
lea eax, [ebp + 0x1ac]
push eax
push dword [ebp - 0x1c]
call dword [ebp - 0x40]
push edi
push edi
push esi
lea eax, [ebp + 0xac]
push eax
push 0xffffffffffffffff
lea eax, [ebp + 0x1ac]
push eax
push edi
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0x224
call fcn.004dccf9
pop ecx
mov ecx, eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 2
cmp ecx, edi
je 0x478774
call fcn.00499854
mov ebx, eax
jmp 0x478776
xor ebx, ebx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 8]
or dword [ebp - 4], 0xffffffff
push ebx
call fcn.0045b961
push pe_nt_image_headers32
call fcn.004dccf9
pop ecx
mov ecx, eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 3
cmp ecx, edi
je 0x4787af
push str.Gigabyte_ODIN
call fcn.00452aad
mov esi, eax
jmp 0x4787b1
xor esi, esi
or dword [ebp - 4], 0xffffffff
call fcn.00451ca2
mov ecx, dword [eax + 0x28]
push esi
call fcn.00419000
push esi
mov ecx, ebx
call fcn.00476691
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x1c]
call dword [ebp - 0x48]
test al, al
je 0x478a01
lea eax, [ebp + 0x40]
push eax
push dword [ebp - 0x24]
call dword [ebp - 0x38]
cmp eax, 0x110000
jne 0x47883d
push 0x23c
call fcn.004dccf9
pop ecx
mov ecx, eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 4
cmp ecx, edi
je 0x478823
movzx eax, word [ebp + 0x44]
push eax
movzx eax, word [ebp + 0x46]
push eax
mov eax, dword [ebp - 0x18]
add eax, 4
push eax
call fcn.0046bf1b
mov esi, eax
jmp 0x478825
xor esi, esi
or dword [ebp - 4], 0xffffffff
call fcn.00451ca2
mov ecx, dword [eax + 0x20]
push esi
call fcn.00441237
mov dword [ebx + 0x15c], esi
push dword [ebp - 0x24]
jmp 0x4789fe
movzx eax, word [ebp - 0x5e]
sub eax, 9
je 0x478898
dec eax
je 0x478878
dec eax
jne 0x478a01
push 0x418
call fcn.004dccf9
pop ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 7
cmp eax, edi
je 0x4788b8
push 0x100
jmp 0x4788af
push 0x418
call fcn.004dccf9
pop ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 6
cmp eax, edi
je 0x4788b8
push 0x80
jmp 0x4788af
push 0x418
call fcn.004dccf9
pop ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
cmp eax, edi
je 0x4788b8
push 0x10
mov ecx, eax
call fcn.00497ef2
jmp 0x4788ba
xor eax, eax
mov dword [ebp - 4], esi
mov esi, eax
cmp esi, edi
je 0x478a01
mov eax, dword [ebp - 0x18]
add eax, 4
push eax
lea eax, [esi + 0x180]
push 0x200
push eax
call fcn.004ef010
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 8]
add esp, 0xc
push esi
call fcn.0045b961
jmp 0x478a01
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x1c]
call dword [ebp - 0x48]
test al, al
je 0x478a01
lea eax, [ebp]
push eax
push dword [ebp - 0x20]
call dword [ebp - 0x38]
cmp eax, 0x110000
jne 0x4789fb
mov eax, 0x84
cmp word [ebp + 2], ax
jne 0x4789fb
cmp word [ebp], 4
jne 0x4789fb
lea esi, [eax + 0x7c]
push esi
lea eax, [ebp + 0x1ac]
push eax
push dword [ebp - 0x1c]
call dword [ebp - 0x40]
push edi
push edi
push esi
lea eax, [ebp + 0xac]
push eax
push 0xffffffffffffffff
lea eax, [ebp + 0x1ac]
push eax
push edi
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0x41c
call fcn.004dccf9
pop ecx
mov ecx, eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edi
cmp ecx, edi
je 0x478987
lea eax, [ebp + 0xac]
push eax
call fcn.00495bac
mov esi, eax
jmp 0x478989
xor esi, esi
mov eax, dword [ebp - 0x18]
or dword [ebp - 4], 0xffffffff
add eax, 4
push eax
lea eax, [esi + 0x1dc]
push 0x200
push eax
call fcn.004ef010
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 8]
add esp, 0xc
push esi
call fcn.0045b961
push 0x4b0
call fcn.004dccf9
pop ecx
mov ecx, eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 1
cmp ecx, edi
je 0x4789df
lea eax, [ebp + 0xac]
push eax
call fcn.00495976
mov ebx, eax
jmp 0x4789e1
xor ebx, ebx
or dword [ebp - 4], 0xffffffff
push ebx
mov ecx, esi
call fcn.00476691
call fcn.00451ca2
mov ecx, dword [eax + 0x28]
push ebx
call fcn.00419000
push dword [ebp - 0x20]
call dword [ebp - 0x4c]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x18]
call fcn.004eef13
inc dword [ebp - 0x30]
pop ecx
lea eax, [ebp + 0x80]
push eax
push dword [ebp - 0x30]
lea eax, [ebp + 0x9c]
push eax
push edi
push dword [ebp - 0x28]
call dword [ebp - 0x34]
test eax, eax
jne 0x47866a
mov ebx, dword [ebp - 0x58]
push dword [ebp - 0x28]
call dword [ebp - 0x54]
push dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
cmp ebx, edi
je 0x478a51
push ebx
call esi
xor eax, eax
inc eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2ac]
xor ecx, ebp
call fcn.004edcb6
add ebp, 0x2b0
leave
ret