Function at 0x541e70
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
mov eax, 0x1898
call fcn.0054cd40
push esi
mov esi, dword [esp + 0x18a0]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [esp + 0x14], ecx
push esi
call edi
cmp eax, 0xffffffff
je 0x542280
push esi
call edi
test al, 0x10
jne 0x542280
mov eax, dword [0x5b93e4]
mov ecx, dword [str.._]
mov dl, byte [0x5b939c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x3a0], ecx
mov ecx, 0x3e
xor eax, eax
lea edi, [esp + 0x3a5]
mov byte [esp + 0x3a4], dl
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
stosb byte es:[edi], al
push esi
lea eax, [esp + 0xa8]
push 0x200
push eax
push 0x5de854
xor ebx, ebx
push str.MapCount
push str.DeviceMap
mov dword [esp + 0x28], ebx
call ebp
lea ecx, [esp + 0x10]
lea edx, [esp + 0xa4]
push ecx
push 0x5b91e4
push edx
call fcn.0054c6fc
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x70]
add esp, 0xc
rep stosd dword es:[edi], eax
lea eax, [esp + 0x64]
push str.DeviceMap
push eax
call fcn.0054c45b
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0x8b0]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x2ac]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x2ac]
push ecx
call fcn.0053534c
mov edi, str.UFD_MPusbhub.cfg
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x2a4]
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 + 0x10]
mov ecx, edx
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
jle 0x542192
lea esi, [esp + 0x8a8]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], esi
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0xa4]
push ebx
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x3ac]
rep stosd dword es:[edi], eax
mov ecx, 0x10
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x28]
push 0x5b91e4
push eax
call fcn.0054c45b
mov ecx, dword [esp + 0x18b8]
add esp, 0xc
lea edx, [esp + 0xa4]
lea eax, [esp + 0x24]
push ecx
push 0x200
push edx
push 0x5de854
lea ecx, [esp + 0x74]
push eax
push ecx
call ebp
lea edi, [esp + 0xa4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x542173
lea edx, [esp + 0x18]
lea eax, [esp + 0xa4]
push edx
push eax
call fcn.0054e7e7
add esp, 8
xor ebp, ebp
test eax, eax
je 0x54207b
mov edi, esi
push edi
push 0x5b91e4
push eax
call fcn.0054c6fc
lea ecx, [esp + 0x24]
inc ebp
push ecx
push 0
add edi, 4
call fcn.0054e7e7
add esp, 0x14
test eax, eax
jne 0x542058
mov ecx, dword [esp + 0x1c]
lea edx, [ebp - 2]
lea eax, [esp + 0x3a8]
push edx
push eax
push esi
call fcn.00541c80
test eax, eax
je 0x54216d
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0xa4]
lea esi, [ebx + 1]
rep stosd dword es:[edi], eax
push esi
lea ecx, [esp + 0xa8]
push str.HubName_d
push ecx
call fcn.0054c45b
add esp, 0xc
lea edx, [esp + 0x2a4]
lea eax, [esp + 0x3a8]
lea ecx, [esp + 0xa4]
push edx
push eax
push ecx
push str.TEST
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0xa4]
push esi
lea edx, [esp + 0xa8]
push str.PortIndex_d
rep stosd dword es:[edi], eax
push edx
call fcn.0054c45b
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x4b4]
add esp, 0xc
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x4a8]
add eax, ebp
mov ecx, dword [esp + eax*4 + 0x8a4]
push ecx
push 0x5b91e4
push edx
call fcn.0054c45b
add esp, 0xc
lea eax, [esp + 0x2a4]
lea ecx, [esp + 0x4a8]
lea edx, [esp + 0xa4]
push eax
push ecx
push edx
push str.TEST
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov esi, dword [esp + 0x20]
jmp 0x542173
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
inc ebx
add esi, 0x40
add edx, 0x10
cmp ebx, eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], edx
jl 0x541fc2
mov ebx, dword [esp + 0x1c]
test eax, eax
mov dword [ebx + 4], eax
jle 0x54226e
mov esi, 1
add ebx, 8
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0xa4]
push esi
rep stosd dword es:[edi], eax
lea eax, [esp + 0xa8]
push str.HubName_d
push eax
call fcn.0054c45b
add esp, 0xc
lea ecx, [esp + 0x2a4]
lea edx, [ebx + 0x229]
lea eax, [esp + 0xa4]
push ecx
push 0x200
push edx
push 0x5de854
push eax
push str.TEST
call ebp
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0xa4]
push esi
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xa8]
push str.PortIndex_d
push ecx
call fcn.0054c45b
add esp, 0xc
lea edx, [esp + 0x2a4]
lea eax, [esp + 0x6a8]
lea ecx, [esp + 0xa4]
push edx
push 0x200
push eax
push 0x5de854
push ecx
push str.TEST
call ebp
lea edx, [esp + 0x6a8]
push edx
call fcn.0054c538
mov ecx, dword [esp + 0x14]
add esp, 4
inc esi
mov dword [ebx], eax
add ebx, 0x42c
lea eax, [esi - 1]
cmp eax, ecx
jl 0x5421a9
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x1898
ret 4
pop edi
xor eax, eax
pop esi
add esp, 0x1898
ret 4