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

Disassembly:
sub esp, 0x80
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x94]
xor ebp, ebp
push ebp
lea eax, [esp + 0x34]
mov ebx, dword [edi + 0x18]
push 0x2a
lea ecx, [esp + 0x18]
push eax
push ecx
push ebx
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x48], ebx
call fcn.0050b600
add esp, 0x14
test eax, eax
jne 0x515229
mov dword [esp + 0x14], 0xfffffffe
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x51520b
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x18]
pop edi
pop esi
cmp eax, ebp
pop ebp
pop ebx
je 0x51521e
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 4]
add esp, 0x80
ret
lea edx, [esp + 0x38]
lea eax, [esp + 0x18]
push edx
push eax
push 3
push ebp
push ebp
push ebx
call fcn.0050c620
add esp, 0x18
test eax, eax
je 0x5151fc
mov esi, dword [esp + 0xa0]
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x24], ebp
jne 0x515273
lea ecx, [esp + 0x1c]
push ecx
push ebx
call fcn.00514ed0
add esp, 8
test eax, eax
jne 0x5152b7
mov eax, dword [esp + 0x10]
mov dword [esp + 0x24], 1
xor ecx, ecx
xor edx, edx
mov ch, byte [eax + 6]
mov dh, byte [eax]
mov cl, byte [eax + 7]
mov dl, byte [eax + 1]
add ecx, 8
add edx, 2
lea edi, [ecx + 0x1e]
cmp edx, edi
jb 0x515200
cmp byte [ecx + eax + 1], 0x1c
jb 0x515200
xor edx, edx
mov edi, dword [esp + 0x94]
mov dh, byte [ecx + eax + 0x1c]
mov dl, byte [ecx + eax + 0x1d]
mov ecx, edx
mov dword [esp + 0x1c], ecx
jmp 0x5152bf
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov edx, dword [edi + 0x48]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], edx
fild qword [esp + 0x3c]
mov dword [esp + 0x48], ebp
cmp esi, ebp
fidiv dword [esp + 0x44]
fstp dword [0x72b178]
je 0x51551c
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x20]
push eax
push ecx
push esi
push edx
call fcn.00514f90
add esp, 0x10
test eax, eax
je 0x5151fc
cmp dword [edi + 0x58], ebp
je 0x515404
cmp esi, 0xffffffff
je 0x515404
mov esi, dword [edi + 0x48]
mov ecx, dword [esp + 0x20]
cmp esi, 0xb0
jne 0x515331
cmp ecx, 0x6e0
jae 0x5153af
mov eax, ecx
xor edx, edx
div esi
mov eax, 0xcccccccd
mov edi, edx
mul esi
shr edx, 3
cmp edi, edx
jb 0x5153af
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], ebp
fild qword [esp + 0x4c]
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], ebp
fild qword [esp + 0x54]
fld st(1)
fmul qword [0x64de80]
fcompp
fnstsw ax
test ah, 1
jne 0x5153ad
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], ebp
fild qword [esp + 0x5c]
push ecx
sub esp, 8
fdiv st(1)
fstp qword [esp]
push str.Setting_the_drive_speed_to__.1fx___uKB_s_.
push 0x185
fstp st(0)
call fcn.0051faa0
add esp, 8
push eax
mov eax, dword [esp + 0xa4]
push ebp
push eax
call fcn.0051a630
add esp, 0x18
jmp 0x5153fa
fstp st(0)
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], ebp
fild qword [esp + 0x64]
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], ebp
fild qword [esp + 0x6c]
push ecx
fdivp st(1)
fadd qword [0x64de78]
call fcn.00542018
push eax
push 0x72d664
push 0x186
call fcn.0051faa0
mov ecx, dword [esp + 0xa4]
add esp, 8
push eax
push ebp
push ecx
call fcn.0051a630
add esp, 0x14
mov edx, dword [esp + 0x94]
mov dword [edx + 0x58], ebp
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
xor esi, esi
cmp eax, ecx
je 0x51554c
mov edx, dword [esp + 0x2c]
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x74]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
push ebp
push ebp
mov al, byte [edx + ecx]
mov edx, dword [esp + 0xa0]
lea ecx, [esp + 0x30]
mov byte [esp + 0x7c], al
push ecx
push ebp
push edx
push ebx
call fcn.0050cba0
mov ecx, dword [esp + 0x44]
add esp, 0x18
test eax, eax
mov eax, dword [esp + 0x18]
je 0x515485
mov edx, dword [esp + 0x28]
dec edx
mov ebx, edx
mov dword [esp + 0x28], edx
shr ebx, 0x18
mov byte [esp + 0x7c], bl
mov ebx, edx
shr ebx, 0x10
mov byte [esp + 0x7d], bl
mov ebx, edx
shr ebx, 8
mov byte [esp + 0x7e], bl
mov ebx, dword [esp + 0x34]
mov byte [esp + 0x7f], dl
jmp 0x51548d
mov edx, dword [ecx + eax + 4]
mov dword [esp + 0x7c], edx
mov edx, dword [ecx + eax + 8]
push 0x1c
mov dword [esp + 0x84], edx
mov eax, dword [ecx + eax + 0xc]
lea ecx, [esp + 0x78]
mov dword [esp + 0x8c], eax
push ecx
push 0x1c
push ebp
push ebx
mov byte [esp + 0xa2], 3
mov byte [esp + 0x9a], 3
mov byte [esp + 0xa3], 0xe8
mov byte [esp + 0x9b], 0xe8
call fcn.0050bdb0
add esp, 0x14
test eax, eax
je 0x5151f4
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebp
lea eax, [esp + 0x34]
push 0x2a
lea ecx, [esp + 0x18]
push eax
push ecx
push ebx
mov dword [esp + 0x24], ebp
call fcn.0050b600
add esp, 0x14
test eax, eax
je 0x5151f4
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x94]
jmp 0x515536
mov edx, dword [esp + 0x20]
cmp edx, ebp
je 0x515550
cmp edx, ecx
je 0x515550
cmp dword [esp + 0x24], ebp
jne 0x51553f
mov dword [esp + 0x24], 1
cmp edx, ebp
je 0x515550
jmp 0x51524f
mov dword [esp + 0x14], 0xfffffffe
jmp 0x515200
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], 1
jmp 0x515200