Function at 0x8125d0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x887ec6
mov eax, dword fs:[0]
push eax
sub esp, 0xdc
mov eax, dword [0xb9e498]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0xb9e498]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
mov edi, dword [esp + 0x10c]
mov ebp, dword [esp + 0x100]
mov esi, ecx
mov al, byte [esi + 6]
test al, al
je 0x812633
cmp word [esi + 4], bp
je 0x8127d1
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
call edx
or eax, 0xffffffff
mov dword [esi + 0x48], eax
mov dword [esi + 0xf0], eax
mov eax, dword [esp + 0x108]
mov dword [esi + 8], eax
test eax, eax
jne 0x812657
mov ecx, esi
call fcn.008133d0
mov dword [esi + 8], eax
mov eax, dword [esi + 8]
mov ebx, dword [esp + 0x104]
mov byte [esi + 0x10], bl
cmp eax, 0x80
ja case.0x812676.3
movzx ecx, byte [eax + 0x812df4]
jmp dword [ecx*4 + 0x812dcc]
mov ecx, 0xb54a54
jmp 0x81270c
mov ecx, 0xb54a50
jmp 0x81270c
mov ecx, str.oem2k
jmp 0x81270c
mov ecx, 0xb54a44
jmp 0x81270c
mov ecx, str.borg
jmp 0x81270c
test bl, bl
je case.0x8127e1.0
mov edx, dword [esi]
push str.Tried_to_call_open_with_BOARDTYPE_HDNTV
mov eax, dword [edx + 0x78]
mov ecx, esi
call eax
xor al, al
mov ecx, dword [esp + 0xf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xd8]
xor ecx, esp
call fcn.00841e91
add esp, 0xe8
ret 0x10
test bl, bl
je case.0x8127e1.0
mov edx, dword [esi]
push str.Tried_to_call_open_with_BOARDTYPE_KONA2
jmp 0x8126ae
test bl, bl
je case.0x8127e1.0
mov edx, dword [esi]
push str.Tried_to_call_open_with_BOARDTYPE_KONAX
jmp 0x8126ae
test bl, bl
je case.0x8127e1.0
mov edx, dword [esi]
push str.Tried_to_call_open_with_BOARDTYPE_UNKNOWN
jmp 0x8126ae
mov ecx, dword [esp + 0x24]
test edi, edi
je 0x8127d8
cmp byte [edi], 0
je 0x8127d8
movzx edx, word [esi + 4]
push edx
push ecx
push edi
push str._s:_s_d
lea eax, [esp + 0xdc]
push 0x1f
push eax
call fcn.00812220
movzx eax, word [esi + 8]
mov edx, dword [esi]
mov edx, dword [edx + 0x7c]
add esp, 0x18
push edi
push eax
push ebx
push ebp
mov ecx, esi
call edx
test al, al
jne case.0x812897.3
mov eax, dword [esi]
mov edx, dword [eax + 0x78]
push 0xb54968
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push 0
push 0xffffffffffffffff
lea ecx, [esi + 0xc]
push ecx
push 0x32
mov ecx, esi
mov byte [esi + 6], 1
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push 3
push 0x78
lea ecx, [esp + 0x2c]
push ecx
push 0
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push 1
push 0x1e
lea ecx, [esp + 0x34]
push ecx
push 1
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push 6
push 0x40
lea ecx, [esp + 0x38]
push ecx
push 1
mov ecx, esi
call edx
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
and eax, 1
and ecx, 0xf
shl eax, 4
or eax, ecx
push eax
push edx
mov ecx, esi
call fcn.008133e0
mov al, 1
jmp 0x8126b7
cmp eax, 8
ja case.0x8127e1.0
jmp dword [eax*4 + 0x812e78]
mov ecx, dword [0xb54958]
mov dword [esi + 0xf8], ecx
mov edx, dword [0xb5495c]
mov dword [esi + 0xfc], edx
mov ecx, dword [0xb54960]
mov dword [esi + 0x100], ecx
mov edx, dword [0xb54964]
jmp 0x81286a
mov ecx, dword [0xb54948]
mov dword [esi + 0xf8], ecx
mov edx, dword [0xb5494c]
mov dword [esi + 0xfc], edx
mov ecx, dword [0xb54950]
mov dword [esi + 0x100], ecx
mov edx, dword [0xb54954]
jmp 0x81286a
mov ecx, dword [0xb54938]
mov dword [esi + 0xf8], ecx
mov edx, dword [0xb5493c]
mov dword [esi + 0xfc], edx
mov ecx, dword [0xb54940]
mov dword [esi + 0x100], ecx
mov edx, dword [0xb54944]
movzx ebx, byte [esi + 0xf4]
neg ebx
sbb ebx, ebx
and ebx, 3
dec eax
mov dword [esi + 0x104], edx
mov word [esi + 4], bp
mov dword [esp + 0x20], ebx
cmp eax, 7
ja case.0x812897.3
movzx eax, byte [eax + 0x812ea8]
jmp dword [eax*4 + 0x812e9c]
movzx ecx, bp
push ecx
lea edx, [esp + 0xb8]
push str..hdntv_ld
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push 0
push 3
push 0
push ebx
push 0xc0000000
lea eax, [esp + 0xcc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0xf0], eax
cmp eax, 0xffffffff
jne case.0x812897.3
jmp case.0x8127e1.0
mov edx, dword [esi + 0xfc]
mov ecx, dword [esi + 0xf8]
mov eax, dword [esi + 0x100]
push 0x12
push 0
mov dword [esp + 0x40], edx
mov dword [esp + 0x3c], ecx
mov ecx, dword [esi + 0x104]
push 0
lea edx, [esp + 0x40]
push edx
mov dword [esp + 0x28], 0
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov dword [esi + 0xec], eax
cmp eax, 0xffffffff
je case.0x8127e1.0
mov ecx, dword [esi + 0xf8]
mov edx, dword [esi + 0xfc]
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 0x100]
mov dword [esp + 0x38], edx
mov edx, dword [esi + 0x104]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
movzx edx, word [esi + 4]
lea ecx, [esp + 0x98]
push ecx
push edx
lea ecx, [esp + 0x3c]
push ecx
push 0
push eax
mov dword [esp + 0xac], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov edx, dword [esi + 0xec]
test eax, eax
jne 0x81299c
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
jmp case.0x8127e1.0
mov ebp, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
push 0
lea eax, [esp + 0x1c]
push eax
push 0
push 0
lea ecx, [esp + 0xa8]
push ecx
push edx
call ebp
test eax, eax
jne 0x812a43
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x8129dd
mov ecx, dword [esi + 0xec]
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
jmp case.0x8127e1.0
mov edx, dword [esp + 0x18]
push edx
call fcn.00822266
add esp, 4
mov dword [esi + 0xcc], eax
test eax, eax
je 0x812a43
lea edi, [esi + 0xd0]
push edi
push 0
mov dword [edi], 0x1c
mov dword [eax], 5
mov ecx, dword [esp + 0x20]
mov edx, dword [esi + 0xcc]
push ecx
mov ecx, dword [esi + 0xec]
push edx
lea eax, [esp + 0xa8]
push eax
push ecx
call ebp
test eax, eax
jne 0x812a55
mov edx, dword [esi + 0xcc]
push edx
call fcn.0082225b
add esp, 4
mov dword [esi + 0xcc], 0
mov eax, dword [esi + 0xec]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
jmp case.0x8127e1.0
cmp dword [esi + 8], 4
jne 0x812bf2
push 0
push 0
call dword [sym.imp.SETUPAPI.dll_SetupDiCreateDeviceInfoList]
mov ecx, dword [esi + 0xe4]
push 0
push ecx
lea edx, [esp + 0x24]
push edx
mov edi, eax
mov dword [esp + 0x28], 0
call dword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
mov eax, dword [esp + 0x1c]
push 0
push eax
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.SETUPAPI.dll_CM_Get_Device_ID_Size]
mov edx, dword [esp + 0x28]
lea eax, [edx + edx]
push eax
call fcn.00822266
mov ecx, dword [esp + 0x2c]
add esp, 4
push 0
lea edx, [ecx + ecx]
mov ebp, eax
mov eax, dword [esp + 0x20]
push edx
push ebp
push eax
call dword [sym.imp.SETUPAPI.dll_CM_Get_Device_IDA]
lea ecx, [esp + 0x7c]
push ecx
push 0
push 0
push ebp
push edi
mov dword [esp + 0x90], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDeviceInfoA]
lea edx, [esp + 0x18]
push edx
push 0
push 0
push 0
push 0xd
lea eax, [esp + 0x90]
push eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x812b04
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00822266
mov edx, dword [esp + 0x1c]
add esp, 4
push 0
push edx
mov ebx, eax
push ebx
push 0
push 0xd
lea eax, [esp + 0x90]
push eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
jne 0x812b42
push ebx
call fcn.0082225b
add esp, 4
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push ebx
lea ecx, [esp + 0x64]
call fcn.0046fb80
push 0
push str.Magma
lea ecx, [esp + 0x68]
mov dword [esp + 0x100], 0
call fcn.008122f0
cmp eax, 0xffffffff
je 0x812bbf
push 1
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x6c]
mov byte [esp + 0x20], 0x20
call fcn.00812240
push 0xffffffffffffffff
push eax
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x6c]
call fcn.00528920
cmp dword [esp + 0x5c], 0x10
mov eax, dword [esp + 0x48]
jae 0x812ba3
lea eax, [esp + 0x48]
push 0
push 0
push eax
call fcn.0083fb4e
add eax, 0xa
add esp, 0xc
lea ecx, [esp + 0x44]
mov dword [esi + 0x14], eax
call fcn.004f8870
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push ebx
call fcn.0082225b
push ebp
call fcn.0082225b
add esp, 8
lea ecx, [esp + 0x60]
mov dword [esp + 0xf8], 0xffffffff
call fcn.004f8870
mov ebx, dword [esp + 0x20]
jmp 0x812d6e
mov ecx, dword [esi + 0xec]
mov ebp, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
push 0xd
push edi
push ecx
call ebp
test eax, eax
je 0x812c20
mov edx, dword [esi + 0xec]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x18]
push eax
call fcn.00822266
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0xec]
add esp, 4
push 0
push ecx
push eax
push 0
push 0xd
push edi
push edx
mov dword [esp + 0x38], eax
call ebp
test eax, eax
jne 0x812c65
mov eax, dword [esp + 0x1c]
push eax
call fcn.0082225b
mov ecx, dword [esi + 0xec]
add esp, 4
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov edx, dword [esp + 0x1c]
push edx
lea ecx, [esp + 0x48]
call fcn.0046fb80
push 0
push str.Magma
lea ecx, [esp + 0x4c]
mov dword [esp + 0x100], 1
call fcn.008122f0
cmp eax, 0xffffffff
je 0x812ce8
push 1
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x50]
mov byte [esp + 0x20], 0x20
call fcn.00812240
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x68]
push ecx
lea ecx, [esp + 0x50]
call fcn.00528920
cmp dword [esp + 0x78], 0x10
mov eax, dword [esp + 0x64]
jae 0x812cca
lea eax, [esp + 0x64]
push 0
push 0
push eax
call fcn.0083fb4e
add eax, 0xa
add esp, 0xc
lea ecx, [esp + 0x60]
mov dword [esi + 0x14], eax
call fcn.004f8870
jmp 0x812d4d
mov ecx, dword [esi + 0xec]
lea edx, [esp + 0x18]
push edx
push 0
lea eax, [esp + 0x28]
push eax
push 0
push 0x10
push edi
push ecx
mov dword [esp + 0x3c], 0
call ebp
test eax, eax
je 0x812d1b
mov edx, dword [esi + 0xec]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x18]
mov edx, dword [esi + 0xec]
push 0
push eax
lea ecx, [esp + 0x28]
push ecx
push 0
push 0x10
push edi
push edx
call ebp
test eax, eax
jne 0x812d46
mov eax, dword [esi + 0xec]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x14], ecx
mov edx, dword [esp + 0x1c]
push edx
call fcn.0082225b
add esp, 4
lea ecx, [esp + 0x44]
mov dword [esp + 0xf8], 0xffffffff
call fcn.004f8870
mov eax, dword [esi + 0xcc]
push 0
push 0
push 3
push 0
push ebx
push 0xc0000000
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0xf0], eax
cmp eax, 0xffffffff
jne case.0x812897.3
mov ecx, dword [esi + 0xcc]
push ecx
call fcn.0082225b
mov edx, dword [esi + 0xec]
add esp, 4
xor edi, edi
push edx
mov dword [esi + 0xcc], edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov dword [esi + 0xec], edi
jmp case.0x8127e1.0