Function at 0x54004e
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x51c
push ebx
push ebp
push esi
lea eax, [esp + 0x224]
push edi
mov ebp, ecx
xor ebx, ebx
push eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], 1
call fcn.0053534c
mov edi, str.UFD_MPPortMapping.cfg
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x228]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x538]
mov ecx, edx
and ecx, 3
cmp eax, ebx
rep movsb byte es:[edi], byte [esi]
je 0x53feea
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
xor esi, esi
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x28]
push esi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push str.szHUBPath_d
push eax
call fcn.0054c45b
add esp, 0xc
lea ecx, [esp + 0x228]
lea edx, [esp + 0x28]
push ecx
push 0x5de854
push edx
push str.TEST
call ebx
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x28]
push esi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push str.PortIndex_d
push eax
call fcn.0054c45b
add esp, 0xc
lea ecx, [esp + 0x32c]
push esi
push 0x5b91e4
push ecx
call fcn.0054c45b
add esp, 0xc
lea edx, [esp + 0x228]
lea eax, [esp + 0x32c]
lea ecx, [esp + 0x28]
push edx
push eax
push ecx
push str.TEST
call ebx
inc esi
cmp esi, 0x10
jl 0x53fe46
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x51c
ret 0xc
mov edx, dword [esp + 0x530]
mov eax, dword [esp + 0x10]
add ebp, 0x46d8
add eax, 8
mov dword [esp + 0x14], ebp
lea ebp, [edx + 0x229]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x534]
mov ecx, 0x80
test eax, eax
je 0x540063
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
push ebx
lea ecx, [esp + 0x2c]
push str.szHUBPath_d
push ecx
call fcn.0054c45b
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [esp + 0x228]
lea eax, [esp + 0x28]
push edx
push 0x200
push ebp
push 0x5de854
push eax
push str.TEST
call esi
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x28]
push ebx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x2c]
push str.PortIndex_d
push ecx
call fcn.0054c45b
add esp, 0xc
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x32c]
lea edx, [esp + 0x228]
rep stosd dword es:[edi], eax
push edx
lea eax, [esp + 0x330]
push 0x200
push eax
lea ecx, [esp + 0x34]
push 0x5de854
push ecx
push str.TEST
call esi
lea edx, [esp + 0x32c]
push edx
call fcn.0054c538
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
add esp, 4
mov dword [ecx], eax
mov eax, dword [edx + 0x5718]
test eax, eax
je 0x5401b7
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x28]
push ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push str.USBStorPath_d
push eax
call fcn.0054c45b
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x338]
add esp, 0xc
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x228]
lea edx, [esp + 0x32c]
push ecx
push 0x200
push edx
lea eax, [esp + 0x34]
push 0x5de854
push eax
push str.TEST
call esi
lea edi, [esp + 0x32c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x5401b7
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
push ebx
lea eax, [esp + 0x2c]
push str.szHUBPath_d
push eax
call fcn.0054c45b
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
add esp, 0xc
lea ecx, [esp + 0x228]
lea edx, [esp + 0x28]
push ecx
push ebp
push edx
push str.TEST
call esi
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x28]
push ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push str.PortIndex_d
push eax
call fcn.0054c45b
mov ecx, dword [ebp - 0x229]
add esp, 0xc
lea edx, [esp + 0x32c]
push ecx
push 0x5b91e4
push edx
call fcn.0054c45b
add esp, 0xc
lea eax, [esp + 0x228]
lea ecx, [esp + 0x32c]
lea edx, [esp + 0x28]
push eax
push ecx
push edx
push str.TEST
call esi
mov edi, str.DeviceCount
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x32c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
mov ecx, dword [edi + 4]
inc ecx
push ecx
push 0x5b91e4
push edx
call fcn.0054c45b
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
add esp, 0xc
lea eax, [esp + 0x228]
lea ecx, [esp + 0x32c]
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
push str.TEST
call esi
mov eax, dword [edi + 0x5718]
test eax, eax
je 0x5401b7
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x28]
push ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push str.USBStorPath_d
push eax
call fcn.0054c45b
mov ecx, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x32c]
push ecx
push 0x5b91c4
push edx
call fcn.0054c45b
add esp, 0xc
lea eax, [esp + 0x228]
lea ecx, [esp + 0x32c]
lea edx, [esp + 0x28]
push eax
push ecx
push edx
push str.TEST
call esi
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
inc ebx
add esi, 0x42c
add ebp, 0x42c
add ecx, 0x100
cmp ebx, 0x10
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], ecx
jl 0x53ff10
mov eax, dword [esp + 0x534]
test eax, eax
je 0x540319
mov ebp, dword [esp + 0x24]
xor ebx, ebx
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x28]
push ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push str.szHUBPath_d
push eax
call fcn.0054c45b
add esp, 0xc
lea ecx, [esp + 0x228]
lea edx, [esp + 0x28]
push ecx
push 0x200
push ebp
push 0x5de854
push edx
push str.TEST
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov esi, 0x5de854
mov eax, ebp
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x540266
test cl, cl
je 0x540262
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x540266
add eax, 2
add esi, 2
test cl, cl
jne 0x540242
xor eax, eax
jmp 0x54026b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x540277
mov dword [esp + 0x20], 1
inc ebx
add ebp, 0x42c
cmp ebx, 0x10
jl 0x5401f8
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x540297
mov dword [esp + 0x1c], 0
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x28]
lea edx, [esp + 0x28]
rep stosd dword es:[edi], eax
mov edi, str.DeviceCount
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x32c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x80
lea edi, [esp + 0x32c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x228]
lea eax, [esp + 0x28]
push ecx
push 0x200
push edx
push 0x5de854
push eax
push str.TEST
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [esp + 0x32c]
push ecx
call fcn.0054c538
mov edx, dword [esp + 0x14]
add esp, 4
mov dword [edx + 4], eax
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x51c
ret 0xc